OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "base/command_line.h" | 5 #include "base/command_line.h" |
| 6 #include "base/message_loop/message_loop.h" |
6 #include "base/run_loop.h" | 7 #include "base/run_loop.h" |
7 #include "content/public/browser/render_frame_host.h" | 8 #include "content/public/browser/render_frame_host.h" |
8 #include "content/public/browser/render_view_host.h" | 9 #include "content/public/browser/render_view_host.h" |
9 #include "content/public/browser/web_contents.h" | 10 #include "content/public/browser/web_contents.h" |
10 #include "content/public/common/content_switches.h" | 11 #include "content/public/common/content_switches.h" |
11 #include "content/public/renderer/render_view.h" | 12 #include "content/public/renderer/render_view.h" |
12 #include "content/public/renderer/render_view_observer.h" | 13 #include "content/public/renderer/render_view_observer.h" |
13 #include "content/public/test/browser_test_utils.h" | 14 #include "content/public/test/browser_test_utils.h" |
14 #include "content/public/test/content_browser_test.h" | 15 #include "content/public/test/content_browser_test.h" |
15 #include "content/public/test/content_browser_test_utils.h" | 16 #include "content/public/test/content_browser_test_utils.h" |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
118 shell()->web_contents()->GetMainFrame()->InsertVisualStateCallback(base::Bind( | 119 shell()->web_contents()->GetMainFrame()->InsertVisualStateCallback(base::Bind( |
119 &VisualStateTest::InvokeVisualStateCallback, base::Unretained(this))); | 120 &VisualStateTest::InvokeVisualStateCallback, base::Unretained(this))); |
120 | 121 |
121 // Verify that the callback is invoked and a new commit completed. | 122 // Verify that the callback is invoked and a new commit completed. |
122 PostTaskToInProcessRendererAndWait(base::Bind( | 123 PostTaskToInProcessRendererAndWait(base::Bind( |
123 &VisualStateTest::WaitForCommit, base::Unretained(this), &observer, 2)); | 124 &VisualStateTest::WaitForCommit, base::Unretained(this), &observer, 2)); |
124 EXPECT_EQ(1, GetCallbackCount()); | 125 EXPECT_EQ(1, GetCallbackCount()); |
125 } | 126 } |
126 | 127 |
127 } // namespace content | 128 } // namespace content |
OLD | NEW |