OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 <algorithm> | 5 #include <algorithm> |
6 #include <string> | 6 #include <string> |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
(...skipping 1900 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1911 | 1911 |
1912 IN_PROC_BROWSER_TEST_F(PolicyStatisticsCollectorTest, Startup) { | 1912 IN_PROC_BROWSER_TEST_F(PolicyStatisticsCollectorTest, Startup) { |
1913 // Verifies that policy usage histograms are collected at startup. | 1913 // Verifies that policy usage histograms are collected at startup. |
1914 | 1914 |
1915 // BrowserPolicyConnector::Init() has already been called. Make sure the | 1915 // BrowserPolicyConnector::Init() has already been called. Make sure the |
1916 // CompleteInitialization() task has executed as well. | 1916 // CompleteInitialization() task has executed as well. |
1917 content::RunAllPendingInMessageLoop(); | 1917 content::RunAllPendingInMessageLoop(); |
1918 | 1918 |
1919 GURL kAboutHistograms = GURL(std::string(chrome::kAboutScheme) + | 1919 GURL kAboutHistograms = GURL(std::string(chrome::kAboutScheme) + |
1920 std::string(content::kStandardSchemeSeparator) + | 1920 std::string(content::kStandardSchemeSeparator) + |
1921 std::string(chrome::kChromeUIHistogramHost)); | 1921 std::string(content::kChromeUIHistogramHost)); |
1922 ui_test_utils::NavigateToURL(browser(), kAboutHistograms); | 1922 ui_test_utils::NavigateToURL(browser(), kAboutHistograms); |
1923 content::WebContents* contents = | 1923 content::WebContents* contents = |
1924 browser()->tab_strip_model()->GetActiveWebContents(); | 1924 browser()->tab_strip_model()->GetActiveWebContents(); |
1925 std::string text; | 1925 std::string text; |
1926 ASSERT_TRUE(content::ExecuteScriptAndExtractString( | 1926 ASSERT_TRUE(content::ExecuteScriptAndExtractString( |
1927 contents, | 1927 contents, |
1928 "var nodes = document.querySelectorAll('body > pre');" | 1928 "var nodes = document.querySelectorAll('body > pre');" |
1929 "var result = '';" | 1929 "var result = '';" |
1930 "for (var i = 0; i < nodes.length; ++i) {" | 1930 "for (var i = 0; i < nodes.length; ++i) {" |
1931 " var text = nodes[i].innerHTML;" | 1931 " var text = nodes[i].innerHTML;" |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2049 this)); | 2049 this)); |
2050 | 2050 |
2051 MessageLoop::current()->Run(); | 2051 MessageLoop::current()->Run(); |
2052 } | 2052 } |
2053 | 2053 |
2054 INSTANTIATE_TEST_CASE_P(MediaStreamDevicesControllerBrowserTestInstance, | 2054 INSTANTIATE_TEST_CASE_P(MediaStreamDevicesControllerBrowserTestInstance, |
2055 MediaStreamDevicesControllerBrowserTest, | 2055 MediaStreamDevicesControllerBrowserTest, |
2056 testing::Bool()); | 2056 testing::Bool()); |
2057 | 2057 |
2058 } // namespace policy | 2058 } // namespace policy |
OLD | NEW |