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

Side by Side Diff: Source/core/page/ContextMenuControllerTest.cpp

Issue 1216543005: Revert of Add a FrameView lifecycle method that just updates layout, style and compositing. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/layout/LayoutView.cpp ('k') | Source/core/page/PageAnimator.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "config.h" 5 #include "config.h"
6 #include "core/page/ContextMenuController.h" 6 #include "core/page/ContextMenuController.h"
7 7
8 #include "core/clipboard/DataTransfer.h" 8 #include "core/clipboard/DataTransfer.h"
9 #include "core/events/MouseEvent.h" 9 #include "core/events/MouseEvent.h"
10 #include "core/frame/FrameView.h" 10 #include "core/frame/FrameView.h"
(...skipping 11 matching lines...) Expand all
22 virtual void SetUp() 22 virtual void SetUp()
23 { 23 {
24 m_pageHolder = DummyPageHolder::create(IntSize(800, 600)); 24 m_pageHolder = DummyPageHolder::create(IntSize(800, 600));
25 } 25 }
26 26
27 Document& document() const { return m_pageHolder->document(); } 27 Document& document() const { return m_pageHolder->document(); }
28 28
29 void setBodyInnerHTML(const String& htmlContent) 29 void setBodyInnerHTML(const String& htmlContent)
30 { 30 {
31 document().body()->setInnerHTML(htmlContent, ASSERT_NO_EXCEPTION); 31 document().body()->setInnerHTML(htmlContent, ASSERT_NO_EXCEPTION);
32 document().view()->updateAllLifecyclePhases(); 32 document().view()->updateLayoutAndStyleForPainting();
33 } 33 }
34 34
35 private: 35 private:
36 OwnPtr<DummyPageHolder> m_pageHolder; 36 OwnPtr<DummyPageHolder> m_pageHolder;
37 }; 37 };
38 38
39 TEST_F(ContextMenuControllerTest, TestCustomMenu) 39 TEST_F(ContextMenuControllerTest, TestCustomMenu)
40 { 40 {
41 document().settings()->setScriptEnabled(true); 41 document().settings()->setScriptEnabled(true);
42 // Load the the test page. 42 // Load the the test page.
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 EXPECT_STREQ("Title 7 checked", document().title().utf8().data()); 102 EXPECT_STREQ("Title 7 checked", document().title().utf8().data());
103 document().page()->contextMenuController().contextMenuItemSelected(&items[4] ); 103 document().page()->contextMenuController().contextMenuItemSelected(&items[4] );
104 EXPECT_STREQ("Title 7 not checked", document().title().utf8().data()); 104 EXPECT_STREQ("Title 7 not checked", document().title().utf8().data());
105 document().page()->contextMenuController().contextMenuItemSelected(&items[5] ); 105 document().page()->contextMenuController().contextMenuItemSelected(&items[5] );
106 EXPECT_STREQ("Title 8 not checked and Title 9 checked", document().title().u tf8().data()); 106 EXPECT_STREQ("Title 8 not checked and Title 9 checked", document().title().u tf8().data());
107 document().page()->contextMenuController().contextMenuItemSelected(&items[7] ); 107 document().page()->contextMenuController().contextMenuItemSelected(&items[7] );
108 EXPECT_STREQ("Title 10 not checked and Title 8 checked", document().title(). utf8().data()); 108 EXPECT_STREQ("Title 10 not checked and Title 8 checked", document().title(). utf8().data());
109 } 109 }
110 110
111 } 111 }
OLDNEW
« no previous file with comments | « Source/core/layout/LayoutView.cpp ('k') | Source/core/page/PageAnimator.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698