Avoid using window.internals when internals is enough after r117771
authorcaio.oliveira@openbossa.org <caio.oliveira@openbossa.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 22 May 2012 06:28:46 +0000 (06:28 +0000)
committercaio.oliveira@openbossa.org <caio.oliveira@openbossa.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 22 May 2012 06:28:46 +0000 (06:28 +0000)
https://bugs.webkit.org/show_bug.cgi?id=87059

Reviewed by Darin Adler.

Revision r117771 introduced a style change in the layout tests that was not
intended. This patch amends this by using "window.internals" only when checking
for the internals object. Once we know internals is there, we use directly.

This conforms to the style used for layoutTestController in the affected tests.

* editing/deleting/delete-ligature-003.html:
* editing/deleting/paragraph-in-preserveNewline.html:
* editing/deleting/whitespace-pre-1.html:
* editing/execCommand/script-tests/query-command-state.js:
(runTests):
* editing/execCommand/script-tests/query-text-alignment.js:
(runRangeTests):
* editing/execCommand/script-tests/toggle-compound-styles.js:
* editing/selection/5195166-1.html:
* editing/selection/5354455-1.html:
* editing/selection/caret-mode-paragraph-keys-navigation.html:
* editing/selection/collapse-selection-in-bidi.html:
* editing/selection/context-menu-text-selection.html:
* editing/selection/directionality-after-undo-replace.html:
* editing/selection/extend-after-mouse-selection.html:
* editing/selection/extend-selection-after-double-click.html:
* editing/selection/move-by-word-visually-crash-test-1.html:
* editing/selection/move-by-word-visually-crash-test-2.html:
* editing/selection/move-by-word-visually-crash-test-3.html:
* editing/selection/move-by-word-visually-crash-test-4.html:
* editing/selection/move-by-word-visually-crash-test-5.html:
* editing/selection/move-by-word-visually-crash-test-css-generated-content.html:
* editing/selection/move-by-word-visually-crash-test-textarea.html:
* editing/selection/move-by-word-visually-inline-block-positioned-element.html:
* editing/selection/move-by-word-visually-mac.html:
* editing/selection/move-by-word-visually-multi-line.html:
* editing/selection/move-by-word-visually-multi-space.html:
* editing/selection/move-by-word-visually-null-box.html:
* editing/selection/move-by-word-visually-single-space-inline-element.html:
* editing/selection/move-by-word-visually-single-space-one-element.html:
* editing/selection/move-by-word-visually-textarea.html:
* editing/selection/move-by-word-visually-wrong-left-right.html:
* editing/selection/programmatic-selection-on-mac-is-directionless.html:
* editing/selection/rtl-move-selection-right-left.html:
* editing/selection/script-tests/click-in-margins-inside-editable-div.js:
* editing/selection/script-tests/click-in-padding-with-multiple-line-boxes.js:
* editing/selection/script-tests/shift-click.js:
(runShiftClickTest):
* editing/selection/selection-extend-should-not-move-across-caret-on-mac.html:
* editing/style/iframe-onload-crash-mac.html:
* editing/style/iframe-onload-crash-unix.html:
* editing/style/iframe-onload-crash-win.html:
* fast/events/backspace-navigates-back.html:
* fast/forms/selection-direction.html:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@117912 268f45cc-cd09-0410-ab3c-d52691b4dbfc

42 files changed:
LayoutTests/ChangeLog
LayoutTests/editing/deleting/delete-ligature-003.html
LayoutTests/editing/deleting/paragraph-in-preserveNewline.html
LayoutTests/editing/deleting/whitespace-pre-1.html
LayoutTests/editing/execCommand/script-tests/query-command-state.js
LayoutTests/editing/execCommand/script-tests/query-text-alignment.js
LayoutTests/editing/execCommand/script-tests/toggle-compound-styles.js
LayoutTests/editing/selection/5195166-1.html
LayoutTests/editing/selection/5354455-1.html
LayoutTests/editing/selection/caret-mode-paragraph-keys-navigation.html
LayoutTests/editing/selection/collapse-selection-in-bidi.html
LayoutTests/editing/selection/context-menu-text-selection.html
LayoutTests/editing/selection/directionality-after-undo-replace.html
LayoutTests/editing/selection/extend-after-mouse-selection.html
LayoutTests/editing/selection/extend-selection-after-double-click.html
LayoutTests/editing/selection/move-by-word-visually-crash-test-1.html
LayoutTests/editing/selection/move-by-word-visually-crash-test-2.html
LayoutTests/editing/selection/move-by-word-visually-crash-test-3.html
LayoutTests/editing/selection/move-by-word-visually-crash-test-4.html
LayoutTests/editing/selection/move-by-word-visually-crash-test-5.html
LayoutTests/editing/selection/move-by-word-visually-crash-test-css-generated-content.html
LayoutTests/editing/selection/move-by-word-visually-crash-test-textarea.html
LayoutTests/editing/selection/move-by-word-visually-inline-block-positioned-element.html
LayoutTests/editing/selection/move-by-word-visually-mac.html
LayoutTests/editing/selection/move-by-word-visually-multi-line.html
LayoutTests/editing/selection/move-by-word-visually-multi-space.html
LayoutTests/editing/selection/move-by-word-visually-null-box.html
LayoutTests/editing/selection/move-by-word-visually-single-space-inline-element.html
LayoutTests/editing/selection/move-by-word-visually-single-space-one-element.html
LayoutTests/editing/selection/move-by-word-visually-textarea.html
LayoutTests/editing/selection/move-by-word-visually-wrong-left-right.html
LayoutTests/editing/selection/programmatic-selection-on-mac-is-directionless.html
LayoutTests/editing/selection/rtl-move-selection-right-left.html
LayoutTests/editing/selection/script-tests/click-in-margins-inside-editable-div.js
LayoutTests/editing/selection/script-tests/click-in-padding-with-multiple-line-boxes.js
LayoutTests/editing/selection/script-tests/shift-click.js
LayoutTests/editing/selection/selection-extend-should-not-move-across-caret-on-mac.html
LayoutTests/editing/style/iframe-onload-crash-mac.html
LayoutTests/editing/style/iframe-onload-crash-unix.html
LayoutTests/editing/style/iframe-onload-crash-win.html
LayoutTests/fast/events/backspace-navigates-back.html
LayoutTests/fast/forms/selection-direction.html

index b4adaec..bdc788d 100644 (file)
@@ -1,3 +1,61 @@
+2012-05-21  Caio Marcelo de Oliveira Filho  <caio.oliveira@openbossa.org>
+
+        Avoid using window.internals when internals is enough after r117771
+        https://bugs.webkit.org/show_bug.cgi?id=87059
+
+        Reviewed by Darin Adler.
+
+        Revision r117771 introduced a style change in the layout tests that was not
+        intended. This patch amends this by using "window.internals" only when checking
+        for the internals object. Once we know internals is there, we use directly.
+
+        This conforms to the style used for layoutTestController in the affected tests.
+
+        * editing/deleting/delete-ligature-003.html:
+        * editing/deleting/paragraph-in-preserveNewline.html:
+        * editing/deleting/whitespace-pre-1.html:
+        * editing/execCommand/script-tests/query-command-state.js:
+        (runTests):
+        * editing/execCommand/script-tests/query-text-alignment.js:
+        (runRangeTests):
+        * editing/execCommand/script-tests/toggle-compound-styles.js:
+        * editing/selection/5195166-1.html:
+        * editing/selection/5354455-1.html:
+        * editing/selection/caret-mode-paragraph-keys-navigation.html:
+        * editing/selection/collapse-selection-in-bidi.html:
+        * editing/selection/context-menu-text-selection.html:
+        * editing/selection/directionality-after-undo-replace.html:
+        * editing/selection/extend-after-mouse-selection.html:
+        * editing/selection/extend-selection-after-double-click.html:
+        * editing/selection/move-by-word-visually-crash-test-1.html:
+        * editing/selection/move-by-word-visually-crash-test-2.html:
+        * editing/selection/move-by-word-visually-crash-test-3.html:
+        * editing/selection/move-by-word-visually-crash-test-4.html:
+        * editing/selection/move-by-word-visually-crash-test-5.html:
+        * editing/selection/move-by-word-visually-crash-test-css-generated-content.html:
+        * editing/selection/move-by-word-visually-crash-test-textarea.html:
+        * editing/selection/move-by-word-visually-inline-block-positioned-element.html:
+        * editing/selection/move-by-word-visually-mac.html:
+        * editing/selection/move-by-word-visually-multi-line.html:
+        * editing/selection/move-by-word-visually-multi-space.html:
+        * editing/selection/move-by-word-visually-null-box.html:
+        * editing/selection/move-by-word-visually-single-space-inline-element.html:
+        * editing/selection/move-by-word-visually-single-space-one-element.html:
+        * editing/selection/move-by-word-visually-textarea.html:
+        * editing/selection/move-by-word-visually-wrong-left-right.html:
+        * editing/selection/programmatic-selection-on-mac-is-directionless.html:
+        * editing/selection/rtl-move-selection-right-left.html:
+        * editing/selection/script-tests/click-in-margins-inside-editable-div.js:
+        * editing/selection/script-tests/click-in-padding-with-multiple-line-boxes.js:
+        * editing/selection/script-tests/shift-click.js:
+        (runShiftClickTest):
+        * editing/selection/selection-extend-should-not-move-across-caret-on-mac.html:
+        * editing/style/iframe-onload-crash-mac.html:
+        * editing/style/iframe-onload-crash-unix.html:
+        * editing/style/iframe-onload-crash-win.html:
+        * fast/events/backspace-navigates-back.html:
+        * fast/forms/selection-direction.html:
+
 2012-05-21  Levi Weintraub  <leviw@chromium.org>
 
         Unreviewed gardening. Updating more tests post r117815.
index fc33885..9fcd16c 100644 (file)
@@ -15,7 +15,7 @@
         function runTestOn(platform) {
             var testarea = document.getElementById("test");
             if (window.internals)
-                window.internals.settings.setEditingBehavior(platform);
+                internals.settings.setEditingBehavior(platform);
 
             testarea.focus();
             moveSelectionForwardByCharacterCommand();
index 58bb43b..e277731 100644 (file)
@@ -12,7 +12,7 @@ function runTestsOn(platform) {
     var e = document.getElementById("test");
     
     if (window.internals)
-        window.internals.settings.setEditingBehavior(platform);
+        internals.settings.setEditingBehavior(platform);
 
     sel.setPosition(e, 0);
     sel.modify("extend", "forward", "character");
index d325287..2040fa6 100644 (file)
@@ -11,7 +11,7 @@ function runTestsOn(platform) {
     var s = window.getSelection();
 
     if (window.internals)
-        window.internals.settings.setEditingBehavior(platform);
+        internals.settings.setEditingBehavior(platform);
 
     s.setPosition(e, 0);
     s.modify("extend", "forward", "lineBoundary");
index 749d834..659b1f1 100644 (file)
@@ -43,7 +43,7 @@ function selectFirstTwoWords(container) {
 
 function runTests(editingBehavior) {
     if (window.internals)
-        window.internals.settings.setEditingBehavior(editingBehavior);
+        internals.settings.setEditingBehavior(editingBehavior);
     debug('Tests for ' + editingBehavior)
 
     testQueryCommandState("bold", 'hello', selectAll, {'mac': false, 'win': false}[editingBehavior]);
index 97dea0f..78b0109 100644 (file)
@@ -83,7 +83,7 @@ queryTextAlignment(selectFirstPosition, '<div align="right">hello</div>', 'right
 function runRangeTests(editingBehavior)
 {
     if (window.internals)
-        window.internals.settings.setEditingBehavior(editingBehavior);
+        internals.settings.setEditingBehavior(editingBehavior);
     debug('Tests for ' + editingBehavior);
 
     queryTextAlignment(selectMiddleOfHelloWorld, '<p>hello</p><p>world</p>', '');
index 93b40d9..955d7a9 100644 (file)
@@ -23,7 +23,7 @@ for (var i = 0; i < platforms.length; i++) {
     debug('Platform: ' + platform);
 
     if (window.internals)
-        window.internals.settings.setEditingBehavior(platform);
+        internals.settings.setEditingBehavior(platform);
 
     if (platform == 'win' || platform == 'unix')
         platform = 'nonmac';
index 48fe59f..0d743fb 100644 (file)
@@ -13,7 +13,7 @@ function log(str)
 
 function runTest(platform, expectedText)
 {
-    window.internals.settings.setEditingBehavior(platform);
+    internals.settings.setEditingBehavior(platform);
     
     var target = document.getElementById('select');
     var startX = target.offsetLeft + target.offsetWidth;
index 99cbb0e..1ab4d5b 100644 (file)
@@ -10,7 +10,7 @@
 <script>
 function test(platform, result) {
     window.getSelection().removeAllRanges();
-    window.internals.settings.setEditingBehavior(platform);
+    internals.settings.setEditingBehavior(platform);
     
     paragraph = document.getElementById("text");
     x = paragraph.offsetParent.offsetLeft + paragraph.offsetLeft + paragraph.offsetWidth + 10;
index ff0905c..34e150b 100644 (file)
@@ -13,7 +13,7 @@ description("This tests that keys navigation through a paragraph work as expecte
 if (window.layoutTestController && window.internals) {
   layoutTestController.overridePreference("WebKitEnableCaretBrowsing", true);
   layoutTestController.dumpAsText();
-  window.internals.settings.setEditingBehavior('mac');
+  internals.settings.setEditingBehavior('mac');
 
   var target = document.getElementById("target");
   target.focus();
index 8efe9eb..e66fcaa 100644 (file)
@@ -14,7 +14,7 @@ The selection should collapse to the left if you pressed the left arrow key and
 <script>
 
 if (window.internals) {
-    window.internals.settings.setEditingBehavior('mac');
+    internals.settings.setEditingBehavior('mac');
 
     function selectTarget(target) {
         eventSender.mouseMoveTo(target.offsetLeft + target.offsetWidth * 2 / 5, target.offsetTop + 5);
index 89fcb0a..2013ac9 100644 (file)
@@ -11,7 +11,7 @@ function test(platform, selectionExpected, result)
     // clear selection
     window.getSelection().removeAllRanges();
 
-    window.internals.settings.setEditingBehavior(platform);
+    internals.settings.setEditingBehavior(platform);
 
     var text = document.getElementById("text");
 
index f026936..258774b 100644 (file)
@@ -18,7 +18,7 @@ if (window.layoutTestController && window.internals) {
     if (!window.eventSender)
         document.writeln('FAIL - this test requires eventSender');
     else {
-        window.internals.settings.setEditingBehavior('mac');
+        internals.settings.setEditingBehavior('mac');
 
         var test = document.getElementById('target');
         eventSender.mouseMoveTo(target.offsetLeft + target.offsetWidth / 2, target.offsetTop + target.offsetHeight / 2);
index 2e66320..92e421a 100644 (file)
@@ -16,7 +16,7 @@
 function editingTest(editingBehavior) {
 
     if (window.internals)
-        window.internals.settings.setEditingBehavior(editingBehavior);
+        internals.settings.setEditingBehavior(editingBehavior);
 
     var startTarget = document.getElementById('start');
     var endTarget = document.getElementById('end');
index ba923c9..fa18fc9 100644 (file)
@@ -36,7 +36,7 @@
 
     function runTest(behavior, expectedText)
     {
-        window.internals.settings.setEditingBehavior(behavior);
+        internals.settings.setEditingBehavior(behavior);
         doubleClickWord();
         getSelection().modify("extend", "backward", "character");
         getSelection().modify("extend", "backward", "character");
index 6c78dab..583d0d9 100644 (file)
@@ -12,7 +12,7 @@ onload = function() {
 
 if (window.layoutTestController && window.internals) {
     layoutTestController.dumpAsText();
-    window.internals.settings.setEditingBehavior('win');
+    internals.settings.setEditingBehavior('win');
 }
 </script>
 <textarea></textarea>
index 67ddd8e..23056c7 100644 (file)
@@ -12,7 +12,7 @@ onload = function() {
 
 if (window.layoutTestController && window.internals) {
     layoutTestController.dumpAsText();
-    window.internals.settings.setEditingBehavior('win');
+    internals.settings.setEditingBehavior('win');
 }
 </script>
 <vkern></vkern><marquee><div title="0|0" class="test_move_by_word">abc def
index bae03dc..e77889c 100644 (file)
@@ -12,7 +12,7 @@ onload = function() {
 
 if (window.layoutTestController && window.internals) {
     layoutTestController.dumpAsText();
-    window.internals.settings.setEditingBehavior('win');
+    internals.settings.setEditingBehavior('win');
 }
 </script>
 <video></video><meter><image class="test_move_by_word" title="0|0">
index b069569..ac5f482 100644 (file)
@@ -12,7 +12,7 @@ onload = function() {
 
 if (window.layoutTestController && window.internals) {
     layoutTestController.dumpAsText();
-    window.internals.settings.setEditingBehavior('win');
+    internals.settings.setEditingBehavior('win');
 }
 </script>
 ><div title="0|0" class="test_move_by_word" dir=ltr><keygen><base>
index 51ce845..c9ce2ff 100644 (file)
@@ -11,7 +11,7 @@ onload = function() {
 
 if (window.layoutTestController && window.internals) {
     layoutTestController.dumpAsText();
-    window.internals.settings.setEditingBehavior('win');
+    internals.settings.setEditingBehavior('win');
 }
 </script>
 
index ca54b87..4239ca0 100644 (file)
@@ -19,7 +19,7 @@ onload = function() {
 
 if (window.layoutTestController && window.internals) {
     layoutTestController.dumpAsText();
-    window.internals.settings.setEditingBehavior('win');
+    internals.settings.setEditingBehavior('win');
 }
 </script>
 <div contenteditable dir=ltr>
index 5e3a424..8635e85 100644 (file)
@@ -18,7 +18,7 @@ onload = function() {
 
 if (window.layoutTestController && window.internals) {
     layoutTestController.dumpAsText();
-    window.internals.settings.setEditingBehavior('win');
+    internals.settings.setEditingBehavior('win');
 }
 </script>
 
index cf19b53..07d8d6e 100644 (file)
@@ -12,7 +12,7 @@ onload = function() {
 
 if (window.layoutTestController && window.internals) {
     layoutTestController.dumpAsText();
-    window.internals.settings.setEditingBehavior('win');
+    internals.settings.setEditingBehavior('win');
 }
 </script>
 
index 59ce68e..24bb2a2 100644 (file)
@@ -19,7 +19,7 @@ onload = function() {
 
 if (window.layoutTestController && window.internals) {
     layoutTestController.dumpAsText();
-    window.internals.settings.setEditingBehavior('mac');
+    internals.settings.setEditingBehavior('mac');
 }
 </script>
 </head>
index 7191dcc..d1be03a 100644 (file)
@@ -19,7 +19,7 @@ onload = function() {
 
 if (window.layoutTestController && window.internals) {
     layoutTestController.dumpAsText();
-    window.internals.settings.setEditingBehavior('win');
+    internals.settings.setEditingBehavior('win');
 }
 </script>
 </head>
index 20668ba..95a9538 100644 (file)
@@ -19,7 +19,7 @@ onload = function() {
 
 if (window.layoutTestController && window.internals) {
     layoutTestController.dumpAsText();
-    window.internals.settings.setEditingBehavior('win');
+    internals.settings.setEditingBehavior('win');
 }
 </script>
 </head>
index b83caa9..30bbfbf 100644 (file)
@@ -18,7 +18,7 @@ onload = function() {
 
 if (window.layoutTestController && window.internals) {
     layoutTestController.dumpAsText();
-    window.internals.settings.setEditingBehavior('win');
+    internals.settings.setEditingBehavior('win');
 }
 </script>
 <div id="console"></div>
index 250e0d6..d52f588 100644 (file)
@@ -19,7 +19,7 @@ onload = function() {
 
 if (window.layoutTestController && window.internals) {
     layoutTestController.dumpAsText();
-    window.internals.settings.setEditingBehavior('win');
+    internals.settings.setEditingBehavior('win');
 }
 </script>
 </head>
index 350d908..563bede 100644 (file)
@@ -19,7 +19,7 @@ onload = function() {
 
 if (window.layoutTestController && window.internals) {
     layoutTestController.dumpAsText();
-    window.internals.settings.setEditingBehavior('win');
+    internals.settings.setEditingBehavior('win');
 }
 </script>
 </head>
index 78166c6..d6b42e2 100644 (file)
@@ -36,7 +36,7 @@ onload = function() {
 
 if (window.layoutTestController && window.internals) {
     layoutTestController.dumpAsText();
-    window.internals.settings.setEditingBehavior('win');
+    internals.settings.setEditingBehavior('win');
 }
 </script>
 
index fda7cea..cb17552 100644 (file)
@@ -22,7 +22,7 @@ onload = function() {
 
 if (window.layoutTestController && window.internals) {
     layoutTestController.dumpAsText();
-    window.internals.settings.setEditingBehavior('win');
+    internals.settings.setEditingBehavior('win');
 }
 </script>
 <title>wrong result because VisiblePosition.left()/right() returns wrong result</title>
index adb877a..c5a5a7c 100644 (file)
@@ -122,7 +122,7 @@ function runTestsOn(platform, node) {
 
 function runTestsFor(platform) {
     debug(platform + ':');
-    window.internals.settings.setEditingBehavior(platform);
+    internals.settings.setEditingBehavior(platform);
     var listOfTestNodes = document.getElementById('test').childNodes;
 
     for (var i = 0; i < listOfTestNodes.length; i++) {
index 2889e9c..0e6c670 100644 (file)
@@ -70,13 +70,13 @@ function runTests()
     testSelectionChange(setSelection, "move", "left", 3, 0, "Move selection left");
     if (window.layoutTestController && window.internals) {
         layoutTestController.dumpAsText();
-        window.internals.settings.setEditingBehavior("mac");
+        internals.settings.setEditingBehavior("mac");
         testSelectionChange(dragSelection, "extend", "right", 0, 0, "Extend dragged selection right (Mac)");
         testSelectionChange(dragSelection, "extend", "left", 0, 0, "Extend dragged selection left (Mac)");
-        window.internals.settings.setEditingBehavior("win");
+        internals.settings.setEditingBehavior("win");
         testSelectionChange(dragSelection, "extend", "right", 0, 0, "Extend dragged selection right (Win)");
         testSelectionChange(dragSelection, "extend", "left", 1, 0, "Extend dragged selection left (Win)");
-        window.internals.settings.setEditingBehavior("unix");
+        internals.settings.setEditingBehavior("unix");
         testSelectionChange(dragSelection, "extend", "right", 0, 0, "Extend dragged selection right (Unix)");
         testSelectionChange(dragSelection, "extend", "left", 1, 0, "Extend dragged selection left (Unix)");
     }
index 3dc9ffa..e9beabb 100644 (file)
@@ -69,7 +69,7 @@ function runInteractiveTests()
 function editingTest(editingBehavior)
 {
     if (window.internals)
-        window.internals.settings.setEditingBehavior(editingBehavior);
+        internals.settings.setEditingBehavior(editingBehavior);
 
     var expectMacStyleSelection = editingBehavior == "mac";
 
index 3699a24..4a8cf38 100644 (file)
@@ -50,7 +50,7 @@ function runInteractiveTests()
 function editingTest(editingBehavior)
 {
     if (window.internals)
-        window.internals.settings.setEditingBehavior(editingBehavior);
+        internals.settings.setEditingBehavior(editingBehavior);
     
     var expectMacStyleSelection = editingBehavior == "mac";
 
index b482d12..af1ea17 100644 (file)
@@ -44,7 +44,7 @@ function assertSelectionOrder(direction)
 
 function runShiftClickTest(editingBehavior)
 {
-    window.internals.settings.setEditingBehavior(editingBehavior);
+    internals.settings.setEditingBehavior(editingBehavior);
 
     // Double-click select to get around eventSender bug where it won't select
     // text just using single-click.
index 5f1dbf9..21598c1 100644 (file)
@@ -17,7 +17,7 @@ of the word (which is windows/unix behavior).
 function editingTest(behavior) {
     if (window.layoutTestController && window.internals) {
         layoutTestController.dumpAsText();
-        window.internals.settings.setEditingBehavior(behavior);
+        internals.settings.setEditingBehavior(behavior);
     }
 
     function getSetCaretFunction(node, container, offset) {
index 6ebe259..c93a6cc 100644 (file)
@@ -1,7 +1,7 @@
 <meta><input><h6><nobr></nobr><datagrid><ins><button><em><iframe onload="
 if (window.layoutTestController && window.internals) {
     layoutTestController.dumpAsText();
-    window.internals.settings.setEditingBehavior('mac');
+    internals.settings.setEditingBehavior('mac');
 }
 
 if (document.counter)
index bfa6f01..4a04f86 100644 (file)
@@ -1,7 +1,7 @@
 <meta><input><h6><nobr></nobr><datagrid><ins><button><em><iframe onload="
 if (window.layoutTestController && window.internals) {
     layoutTestController.dumpAsText();
-    window.internals.settings.setEditingBehavior('unix');
+    internals.settings.setEditingBehavior('unix');
 }
 
 if (document.counter)
index 3d304eb..2a7e068 100644 (file)
@@ -1,7 +1,7 @@
 <meta><input><h6><nobr></nobr><datagrid><ins><button><em><iframe onload="
 if (window.layoutTestController && window.internals) {
     layoutTestController.dumpAsText();
-    window.internals.settings.setEditingBehavior('win');
+    internals.settings.setEditingBehavior('win');
 }
 
 if (document.counter)
index e659cd1..14fcbfc 100644 (file)
@@ -37,7 +37,7 @@ function doStep(step, location) {
         if (!expect(location == 'test-mac', 'navigation to test-mac'))
             return;
 
-        window.internals.settings.setEditingBehavior('mac');
+        internals.settings.setEditingBehavior('mac');
         testBackspaceNavigatesBack();
 
         break;
@@ -50,7 +50,7 @@ function doStep(step, location) {
         if (!expect(location == 'test-win', 'navigation to test-win'))
             return;
 
-        window.internals.settings.setEditingBehavior('win');
+        internals.settings.setEditingBehavior('win');
         testBackspaceNavigatesBack();
 
         break;
@@ -64,7 +64,7 @@ function doStep(step, location) {
             return;
 
         // Test unix behavior: that backspace does not go back.
-        window.internals.settings.setEditingBehavior('unix');
+        internals.settings.setEditingBehavior('unix');
 
         // We expect backspace to *not* navigate.
         // Start a navigation to the success page; if backspace causes us to go back,
index eef19b4..b8bed2a 100644 (file)
@@ -81,7 +81,7 @@ function runTest(element, platform) {
 \r
 function runTestFor(platform) {\r
     if (window.internals)\r
-        window.internals.settings.setEditingBehavior(platform.toLowerCase());\r
+        internals.settings.setEditingBehavior(platform.toLowerCase());\r
     var tests = document.getElementById('tests');\r
     for (var i = 0; i < tests.childNodes.length; i++) {\r
         runTest(tests.childNodes[i], platform);\r