| 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 "base/strings/utf_string_conversions.h" | 5 #include "base/strings/utf_string_conversions.h" |
| 6 #include "chrome/browser/ui/browser.h" | 6 #include "chrome/browser/ui/browser.h" |
| 7 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 7 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
| 8 #include "chrome/common/url_constants.h" | 8 #include "chrome/common/url_constants.h" |
| 9 #include "chrome/test/base/in_process_browser_test.h" | 9 #include "chrome/test/base/in_process_browser_test.h" |
| 10 #include "chrome/test/base/ui_test_utils.h" | 10 #include "chrome/test/base/ui_test_utils.h" |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 #if defined(GOOGLE_CHROME_BUILD) | 27 #if defined(GOOGLE_CHROME_BUILD) |
| 28 // See IDS_ABOUT_TERMS_OF_SERVICE for the complete text. | 28 // See IDS_ABOUT_TERMS_OF_SERVICE for the complete text. |
| 29 const char kOfflineEULAWarning[] = "Chrome OS Terms"; | 29 const char kOfflineEULAWarning[] = "Chrome OS Terms"; |
| 30 #endif | 30 #endif |
| 31 | 31 |
| 32 class TermsOfServiceProcessBrowserTest : public InProcessBrowserTest { | 32 class TermsOfServiceProcessBrowserTest : public InProcessBrowserTest { |
| 33 }; | 33 }; |
| 34 | 34 |
| 35 class TestURLFetcherCallback { | 35 class TestURLFetcherCallback { |
| 36 public: | 36 public: |
| 37 scoped_ptr<net::FakeURLFetcher> CreateURLFetcher( | 37 std::unique_ptr<net::FakeURLFetcher> CreateURLFetcher( |
| 38 const GURL& url, | 38 const GURL& url, |
| 39 net::URLFetcherDelegate* d, | 39 net::URLFetcherDelegate* d, |
| 40 const std::string& response_data, | 40 const std::string& response_data, |
| 41 net::HttpStatusCode response_code, | 41 net::HttpStatusCode response_code, |
| 42 net::URLRequestStatus::Status status) { | 42 net::URLRequestStatus::Status status) { |
| 43 scoped_ptr<net::FakeURLFetcher> fetcher( | 43 std::unique_ptr<net::FakeURLFetcher> fetcher( |
| 44 new net::FakeURLFetcher(url, d, response_data, response_code, status)); | 44 new net::FakeURLFetcher(url, d, response_data, response_code, status)); |
| 45 OnRequestCreate(url, fetcher.get()); | 45 OnRequestCreate(url, fetcher.get()); |
| 46 return fetcher; | 46 return fetcher; |
| 47 } | 47 } |
| 48 MOCK_METHOD2(OnRequestCreate, | 48 MOCK_METHOD2(OnRequestCreate, |
| 49 void(const GURL&, net::FakeURLFetcher*)); | 49 void(const GURL&, net::FakeURLFetcher*)); |
| 50 }; | 50 }; |
| 51 | 51 |
| 52 void AddMimeHeader(const GURL& url, net::FakeURLFetcher* fetcher) { | 52 void AddMimeHeader(const GURL& url, net::FakeURLFetcher* fetcher) { |
| 53 scoped_refptr<net::HttpResponseHeaders> download_headers = | 53 scoped_refptr<net::HttpResponseHeaders> download_headers = |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 std::string body; | 103 std::string body; |
| 104 ASSERT_TRUE(content::ExecuteScriptAndExtractString( | 104 ASSERT_TRUE(content::ExecuteScriptAndExtractString( |
| 105 web_contents, | 105 web_contents, |
| 106 "window.domAutomationController.send(document.body.textContent)", | 106 "window.domAutomationController.send(document.body.textContent)", |
| 107 &body)); | 107 &body)); |
| 108 EXPECT_NE(std::string(), body); | 108 EXPECT_NE(std::string(), body); |
| 109 #endif | 109 #endif |
| 110 } | 110 } |
| 111 | 111 |
| 112 } // namespace | 112 } // namespace |
| OLD | NEW |