Title: [193889] trunk/Websites/bugs.webkit.org
Revision
193889
Author
dba...@webkit.org
Date
2015-12-09 19:42:46 -0800 (Wed, 09 Dec 2015)

Log Message

REGRESSION: code-review-tests.html fails with error "Received an error at line 214"
https://bugs.webkit.org/show_bug.cgi?id=152103

Reviewed by Darin Adler.

Fixes an issue where opening the file code-review-test.html in Safari shows the error message
"FAIL: Received an error at line 214" and in the console there is a _javascript_ TypeError:
    undefined is not an object (evaluating '$('.overallComments textarea').val().trim')

Notice that test testReaddDiscardedCommentWithPreviousComment() is the only test that appends
the toolbar, which inserts the overall comments textarea. The test testSaveCommentsWithMissingLineIds()
assumes that the own properties of the window object are enumerated in the same order as they
were defined in the file code-review-test.html such that the test testReaddDiscardedCommentWithPreviousComment()
is executed before test testSaveCommentsWithMissingLineIds(). The behavior of _javascript_Core with
respect to the enumeration order of properties on the window object have changed since the
test testSaveCommentsWithMissingLineIds() was written such that the order of the own properties
on the window object do not reflect the order in which they were defined in the file. We should
append the toolbar before running the tests and explicitly execute the tests in chosen order so
as to be able to reason of the test results regardless of the enumeration ordering of the
properties in the DOM window object.

Also, removed duplicate 'd' in the name of function "testReaddDiscardedCommentWithPreviousComment"
such that it reads "testReadDiscardedCommentWithPreviousComment".

* code-review-test.html:

Modified Paths

Diff

Modified: trunk/Websites/bugs.webkit.org/ChangeLog (193888 => 193889)


--- trunk/Websites/bugs.webkit.org/ChangeLog	2015-12-10 03:16:48 UTC (rev 193888)
+++ trunk/Websites/bugs.webkit.org/ChangeLog	2015-12-10 03:42:46 UTC (rev 193889)
@@ -1,3 +1,31 @@
+2015-12-09  Daniel Bates  <daba...@apple.com>
+
+        REGRESSION: code-review-tests.html fails with error "Received an error at line 214"
+        https://bugs.webkit.org/show_bug.cgi?id=152103
+
+        Reviewed by Darin Adler.
+
+        Fixes an issue where opening the file code-review-test.html in Safari shows the error message
+        "FAIL: Received an error at line 214" and in the console there is a _javascript_ TypeError:
+            undefined is not an object (evaluating '$('.overallComments textarea').val().trim')
+
+        Notice that test testReaddDiscardedCommentWithPreviousComment() is the only test that appends
+        the toolbar, which inserts the overall comments textarea. The test testSaveCommentsWithMissingLineIds()
+        assumes that the own properties of the window object are enumerated in the same order as they
+        were defined in the file code-review-test.html such that the test testReaddDiscardedCommentWithPreviousComment()
+        is executed before test testSaveCommentsWithMissingLineIds(). The behavior of _javascript_Core with
+        respect to the enumeration order of properties on the window object have changed since the
+        test testSaveCommentsWithMissingLineIds() was written such that the order of the own properties
+        on the window object do not reflect the order in which they were defined in the file. We should
+        append the toolbar before running the tests and explicitly execute the tests in chosen order so
+        as to be able to reason of the test results regardless of the enumeration ordering of the
+        properties in the DOM window object.
+
+        Also, removed duplicate 'd' in the name of function "testReaddDiscardedCommentWithPreviousComment"
+        such that it reads "testReadDiscardedCommentWithPreviousComment".
+
+        * code-review-test.html:
+
 2015-11-17  Lucas Forschler  <lforsch...@apple.com>
 
         bugs.webkit.org is running with changes that are not checked in.

Modified: trunk/Websites/bugs.webkit.org/code-review-test.html (193888 => 193889)


--- trunk/Websites/bugs.webkit.org/code-review-test.html	2015-12-10 03:16:48 UTC (rev 193888)
+++ trunk/Websites/bugs.webkit.org/code-review-test.html	2015-12-10 03:42:46 UTC (rev 193889)
@@ -218,7 +218,7 @@
   handler.call(this);
 }
 
-function testReaddDiscardedCommentWithPreviousComment() {
+function testReadDiscardedCommentWithPreviousComment() {
   document.getElementById('diff-content').innerHTML =
       '<div class="FileDiff">' +
         '<h1><a href="" +
@@ -247,7 +247,6 @@
 
   eraseDraftComments();
   crawlDiff();
-  appendToolbar();
 
   var line = document.getElementById('line0');
   var author = "o...@chromium.org";
@@ -456,9 +455,17 @@
 }
 
 
-for (var property in window) {
-  if (property.indexOf('test') == 0) {
-    window[property]();
-  }
-}
+var tests_to_run = [
+    window.testTracLinks,
+    window.testDraftCommentSaver,
+    window.testReadDiscardedCommentWithPreviousComment,
+    window.testSideBySideDiffWithPreviousCommentsOnSharedLine,
+    window.testSanitizeFragmentForCopy,
+    window.testIsChangeLog,
+    window.testSaveCommentsWithMissingLineIds,
+];
+
+appendToolbar();
+for (var i = 0; i < tests_to_run.length; ++i)
+    tests_to_run[i]();
 </script>
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to