| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/message_loop/message_loop.h" |
| 5 #include "platform/testing/UnitTestHelpers.h" | 6 #include "platform/testing/UnitTestHelpers.h" |
| 6 #include "public/platform/Platform.h" | 7 #include "public/platform/Platform.h" |
| 7 #include "public/platform/WebViewScheduler.h" | 8 #include "public/platform/WebViewScheduler.h" |
| 8 #include "public/web/WebLocalFrame.h" | 9 #include "public/web/WebLocalFrame.h" |
| 9 #include "public/web/WebScriptExecutionCallback.h" | 10 #include "public/web/WebScriptExecutionCallback.h" |
| 10 #include "public/web/WebScriptSource.h" | 11 #include "public/web/WebScriptSource.h" |
| 11 #include "public/web/WebView.h" | 12 #include "public/web/WebView.h" |
| 12 #include "web/tests/sim/SimRequest.h" | 13 #include "web/tests/sim/SimRequest.h" |
| 13 #include "web/tests/sim/SimTest.h" | 14 #include "web/tests/sim/SimTest.h" |
| 14 | 15 |
| (...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 178 // Still Loading, virtual time should not advance. | 179 // Still Loading, virtual time should not advance. |
| 179 mainResource.write("<body>"); | 180 mainResource.write("<body>"); |
| 180 EXPECT_FALSE(webView().scheduler()->virtualTimeAllowedToAdvance()); | 181 EXPECT_FALSE(webView().scheduler()->virtualTimeAllowedToAdvance()); |
| 181 | 182 |
| 182 // Finished loading, virtual time should be able to advance. | 183 // Finished loading, virtual time should be able to advance. |
| 183 mainResource.finish(); | 184 mainResource.finish(); |
| 184 EXPECT_TRUE(webView().scheduler()->virtualTimeAllowedToAdvance()); | 185 EXPECT_TRUE(webView().scheduler()->virtualTimeAllowedToAdvance()); |
| 185 } | 186 } |
| 186 | 187 |
| 187 } // namespace blink | 188 } // namespace blink |
| OLD | NEW |