OLD | NEW |
---|---|
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 <stddef.h> | 5 #include <stddef.h> |
6 #include <utility> | 6 #include <utility> |
7 | 7 |
8 #include "base/base64.h" | 8 #include "base/base64.h" |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
(...skipping 1404 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1415 params->SetString("policy", "advance"); | 1415 params->SetString("policy", "advance"); |
1416 params->SetInteger("budget", 1000); | 1416 params->SetInteger("budget", 1000); |
1417 SendCommand("Emulation.setVirtualTimePolicy", std::move(params), true); | 1417 SendCommand("Emulation.setVirtualTimePolicy", std::move(params), true); |
1418 | 1418 |
1419 WaitForNotification("Emulation.virtualTimeBudgetExpired"); | 1419 WaitForNotification("Emulation.virtualTimeBudgetExpired"); |
1420 | 1420 |
1421 params.reset(new base::DictionaryValue()); | 1421 params.reset(new base::DictionaryValue()); |
1422 params->SetString("expression", "console.log('done')"); | 1422 params->SetString("expression", "console.log('done')"); |
1423 SendCommand("Runtime.evaluate", std::move(params), true); | 1423 SendCommand("Runtime.evaluate", std::move(params), true); |
1424 | 1424 |
1425 // The second timer shold not fire. | 1425 // The second timer shold not fire. |
Sami
2017/05/31 10:47:43
Please update this comment.
alex clarke (OOO till 29th)
2017/05/31 11:01:48
Done.
| |
1426 EXPECT_THAT(console_messages_, ElementsAre("before", "done")); | 1426 EXPECT_THAT(console_messages_, ElementsAre("before", "at", "done")); |
1427 | 1427 |
1428 // Let virtual time advance for another second, which should make the second | 1428 // Let virtual time advance for another second, which should make the second |
Sami
2017/05/31 10:47:43
This one looks out of date too.
alex clarke (OOO till 29th)
2017/05/31 11:01:47
Done.
| |
1429 // timer fire. | 1429 // timer fire. |
1430 params.reset(new base::DictionaryValue()); | 1430 params.reset(new base::DictionaryValue()); |
1431 params->SetString("policy", "advance"); | 1431 params->SetString("policy", "advance"); |
1432 params->SetInteger("budget", 1000); | 1432 params->SetInteger("budget", 1000); |
1433 SendCommand("Emulation.setVirtualTimePolicy", std::move(params), true); | 1433 SendCommand("Emulation.setVirtualTimePolicy", std::move(params), true); |
1434 | 1434 |
1435 WaitForNotification("Emulation.virtualTimeBudgetExpired"); | 1435 WaitForNotification("Emulation.virtualTimeBudgetExpired"); |
1436 | 1436 |
1437 EXPECT_THAT(console_messages_, ElementsAre("before", "done", "at", "after")); | 1437 EXPECT_THAT(console_messages_, ElementsAre("before", "at", "done", "after")); |
1438 } | 1438 } |
1439 | 1439 |
1440 // Tests that the Security.showCertificateViewer command shows the | 1440 // Tests that the Security.showCertificateViewer command shows the |
1441 // certificate corresponding to the visible navigation entry, even when | 1441 // certificate corresponding to the visible navigation entry, even when |
1442 // an interstitial is showing. Regression test for | 1442 // an interstitial is showing. Regression test for |
1443 // https://crbug.com/647759. | 1443 // https://crbug.com/647759. |
1444 IN_PROC_BROWSER_TEST_F(DevToolsProtocolTest, ShowCertificateViewer) { | 1444 IN_PROC_BROWSER_TEST_F(DevToolsProtocolTest, ShowCertificateViewer) { |
1445 // First test that the correct certificate is shown for a normal | 1445 // First test that the correct certificate is shown for a normal |
1446 // (non-interstitial) page. | 1446 // (non-interstitial) page. |
1447 NavigateToURLBlockUntilNavigationsComplete(shell(), GURL("about:blank"), 1); | 1447 NavigateToURLBlockUntilNavigationsComplete(shell(), GURL("about:blank"), 1); |
(...skipping 389 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1837 EXPECT_EQ("polyglottal", value); | 1837 EXPECT_EQ("polyglottal", value); |
1838 found++; | 1838 found++; |
1839 } else { | 1839 } else { |
1840 FAIL(); | 1840 FAIL(); |
1841 } | 1841 } |
1842 } | 1842 } |
1843 EXPECT_EQ(2u, found); | 1843 EXPECT_EQ(2u, found); |
1844 } | 1844 } |
1845 | 1845 |
1846 } // namespace content | 1846 } // namespace content |
OLD | NEW |