Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1638)

Side by Side Diff: third_party/WebKit/Source/modules/accessibility/AXObjectTest.cpp

Issue 1896793002: Rename (updateLayout/updateStyle).*.() to updateStyleAndLayout.*.() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "modules/accessibility/AXObject.h" 5 #include "modules/accessibility/AXObject.h"
6 6
7 #include "core/dom/Document.h" 7 #include "core/dom/Document.h"
8 #include "core/dom/Element.h" 8 #include "core/dom/Element.h"
9 #include "core/testing/DummyPageHolder.h" 9 #include "core/testing/DummyPageHolder.h"
10 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
(...skipping 24 matching lines...) Expand all
35 "<span id=\"button-caps\" role=\"BUTTON\">button-caps</span><br>" 35 "<span id=\"button-caps\" role=\"BUTTON\">button-caps</span><br>"
36 "<span id=\"button-second\" role=\"another-role button\">button-second</ span><br>" 36 "<span id=\"button-second\" role=\"another-role button\">button-second</ span><br>"
37 "<span id=\"aria-bogus\" aria-bogus=\"bogus\">aria-bogus</span><br>" 37 "<span id=\"aria-bogus\" aria-bogus=\"bogus\">aria-bogus</span><br>"
38 "<span id=\"aria-selected\" aria-selected>aria-selected</span><br>" 38 "<span id=\"aria-selected\" aria-selected>aria-selected</span><br>"
39 "<span id=\"haspopup\" aria-haspopup=\"true\">aria-haspopup-true</span>< br>" 39 "<span id=\"haspopup\" aria-haspopup=\"true\">aria-haspopup-true</span>< br>"
40 "<div id=\"focusable\" tabindex=\"1\">focusable</div><br>" 40 "<div id=\"focusable\" tabindex=\"1\">focusable</div><br>"
41 "<div tabindex=\"2\"><div id=\"focusable-parent\">focusable-parent</div> </div><br>" 41 "<div tabindex=\"2\"><div id=\"focusable-parent\">focusable-parent</div> </div><br>"
42 "</body>"; 42 "</body>";
43 43
44 document().documentElement()->setInnerHTML(testContent, ASSERT_NO_EXCEPTION) ; 44 document().documentElement()->setInnerHTML(testContent, ASSERT_NO_EXCEPTION) ;
45 document().updateLayout(); 45 document().updateStyleAndLayout();
46 Element* root(document().documentElement()); 46 Element* root(document().documentElement());
47 EXPECT_FALSE(AXObject::isInsideFocusableElementOrARIAWidget(*root->getElemen tById("plain"))); 47 EXPECT_FALSE(AXObject::isInsideFocusableElementOrARIAWidget(*root->getElemen tById("plain")));
48 EXPECT_TRUE(AXObject::isInsideFocusableElementOrARIAWidget(*root->getElement ById("button"))); 48 EXPECT_TRUE(AXObject::isInsideFocusableElementOrARIAWidget(*root->getElement ById("button")));
49 EXPECT_TRUE(AXObject::isInsideFocusableElementOrARIAWidget(*root->getElement ById("button-parent"))); 49 EXPECT_TRUE(AXObject::isInsideFocusableElementOrARIAWidget(*root->getElement ById("button-parent")));
50 EXPECT_TRUE(AXObject::isInsideFocusableElementOrARIAWidget(*root->getElement ById("button-caps"))); 50 EXPECT_TRUE(AXObject::isInsideFocusableElementOrARIAWidget(*root->getElement ById("button-caps")));
51 EXPECT_TRUE(AXObject::isInsideFocusableElementOrARIAWidget(*root->getElement ById("button-second"))); 51 EXPECT_TRUE(AXObject::isInsideFocusableElementOrARIAWidget(*root->getElement ById("button-second")));
52 EXPECT_FALSE(AXObject::isInsideFocusableElementOrARIAWidget(*root->getElemen tById("aria-bogus"))); 52 EXPECT_FALSE(AXObject::isInsideFocusableElementOrARIAWidget(*root->getElemen tById("aria-bogus")));
53 EXPECT_TRUE(AXObject::isInsideFocusableElementOrARIAWidget(*root->getElement ById("aria-selected"))); 53 EXPECT_TRUE(AXObject::isInsideFocusableElementOrARIAWidget(*root->getElement ById("aria-selected")));
54 EXPECT_TRUE(AXObject::isInsideFocusableElementOrARIAWidget(*root->getElement ById("haspopup"))); 54 EXPECT_TRUE(AXObject::isInsideFocusableElementOrARIAWidget(*root->getElement ById("haspopup")));
55 EXPECT_TRUE(AXObject::isInsideFocusableElementOrARIAWidget(*root->getElement ById("focusable"))); 55 EXPECT_TRUE(AXObject::isInsideFocusableElementOrARIAWidget(*root->getElement ById("focusable")));
56 EXPECT_TRUE(AXObject::isInsideFocusableElementOrARIAWidget(*root->getElement ById("focusable-parent"))); 56 EXPECT_TRUE(AXObject::isInsideFocusableElementOrARIAWidget(*root->getElement ById("focusable-parent")));
57 } 57 }
58 58
59 } // namespace blink 59 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698