From: <asa...@us...> - 2017-08-11 09:19:54
|
Revision: 14786 http://sourceforge.net/p/htmlunit/code/14786 Author: asashour Date: 2017-08-11 09:19:51 +0000 (Fri, 11 Aug 2017) Log Message: ----------- Add BuildServerDiscrepancy Modified Paths: -------------- trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/BrowserVersionFeatures.java trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/FormField.java trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/javascript/NativeArrayTest.java trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/javascript/host/file/FileReaderTest.java Added Paths: ----------- trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/annotations/BuildServerDiscrepancy.java Modified: trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/BrowserVersionFeatures.java =================================================================== --- trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/BrowserVersionFeatures.java 2017-08-11 08:48:15 UTC (rev 14785) +++ trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/BrowserVersionFeatures.java 2017-08-11 09:19:51 UTC (rev 14786) @@ -897,11 +897,11 @@ @BrowserFeature(FF) JS_FILE_SHORT_DATE_FORMAT, - /** Whether {@link FileReader} includes content type or not. */ + /** Whether {@code FileReader} includes content type or not. */ @BrowserFeature(FF) JS_FILEREADER_CONTENT_TYPE, - /** Whether {@link FileReader} includes {@code base64} for empty content or not. */ + /** Whether {@code FileReader} includes {@code base64} for empty content or not. */ @BrowserFeature(IE) JS_FILEREADER_EMPTY_NULL, Modified: trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/FormField.java =================================================================== --- trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/FormField.java 2017-08-11 08:48:15 UTC (rev 14785) +++ trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/FormField.java 2017-08-11 09:19:51 UTC (rev 14786) @@ -46,7 +46,7 @@ final HtmlForm form = ((HtmlElement) domNode).getEnclosingForm(); if (form != null) { - setParentScope(getScriptableFor(form)); + setParentScope(getScriptableFor(form).getParentScope()); } } Added: trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/annotations/BuildServerDiscrepancy.java =================================================================== --- trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/annotations/BuildServerDiscrepancy.java (rev 0) +++ trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/annotations/BuildServerDiscrepancy.java 2017-08-11 09:19:51 UTC (rev 14786) @@ -0,0 +1,31 @@ +/* + * Copyright (c) 2002-2017 Gargoyle Software Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.gargoylesoftware.htmlunit.annotations; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +/** + * An annotation to denote a test which behaves on the build server differnt than locally. + * + * @author Ahmed Ashour + */ +@Retention(RetentionPolicy.SOURCE) +@Target(ElementType.METHOD) +public @interface BuildServerDiscrepancy { + +} Property changes on: trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/annotations/BuildServerDiscrepancy.java ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Modified: trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/javascript/NativeArrayTest.java =================================================================== --- trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/javascript/NativeArrayTest.java 2017-08-11 08:48:15 UTC (rev 14785) +++ trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/javascript/NativeArrayTest.java 2017-08-11 09:19:51 UTC (rev 14786) @@ -27,6 +27,7 @@ import com.gargoylesoftware.htmlunit.BrowserRunner; import com.gargoylesoftware.htmlunit.BrowserRunner.Alerts; import com.gargoylesoftware.htmlunit.BrowserRunner.NotYetImplemented; +import com.gargoylesoftware.htmlunit.annotations.BuildServerDiscrepancy; import com.gargoylesoftware.htmlunit.WebDriverTestCase; /** @@ -184,6 +185,7 @@ * @throws Exception if the test fails */ @Test + @BuildServerDiscrepancy public void comparisonMethodViolatesContract2() throws Exception { final Properties props = System.getProperties(); props.list(System.out); Modified: trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/javascript/host/file/FileReaderTest.java =================================================================== --- trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/javascript/host/file/FileReaderTest.java 2017-08-11 08:48:15 UTC (rev 14785) +++ trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/javascript/host/file/FileReaderTest.java 2017-08-11 09:19:51 UTC (rev 14786) @@ -25,6 +25,8 @@ import com.gargoylesoftware.htmlunit.BrowserRunner; import com.gargoylesoftware.htmlunit.BrowserRunner.Alerts; +import com.gargoylesoftware.htmlunit.BrowserRunner.NotYetImplemented; +import com.gargoylesoftware.htmlunit.annotations.BuildServerDiscrepancy; import com.gargoylesoftware.htmlunit.WebDriverTestCase; import com.gargoylesoftware.htmlunit.html.HtmlPageTest; @@ -32,6 +34,7 @@ * Tests for {@link FileReader}. * * @author Ronald Brill + * @author Ahmed Ashour */ @RunWith(BrowserRunner.class) public class FileReaderTest extends WebDriverTestCase { @@ -120,6 +123,8 @@ FF = "data:application/octet-stream;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABAQMAAAAl21bKAAAABlBMVEX+1K8AAAD" + "jghFsAAAAGXRFWHRTb2Z0d2FyZQBHcmFwaGljQ29udmVydGVyNV1I7gAAABBJREFUeJxiYAAAAAD//wMAAAIAAcx+i34AAAAASU" + "VORK5CYII=") + @NotYetImplemented + @BuildServerDiscrepancy public void readAsDataURLUnknown() throws Exception { final String html = HtmlPageTest.STANDARDS_MODE_PREFIX_ |