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 <stdint.h> | 5 #include <stdint.h> |
6 | 6 |
7 #include <sstream> | 7 #include <sstream> |
8 | 8 |
9 #include "base/base_switches.h" | 9 #include "base/base_switches.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
11 #include "base/macros.h" | 11 #include "base/macros.h" |
12 #include "base/metrics/histogram_base.h" | 12 #include "base/metrics/histogram_base.h" |
13 #include "base/metrics/histogram_samples.h" | 13 #include "base/metrics/histogram_samples.h" |
14 #include "base/metrics/statistics_recorder.h" | 14 #include "base/metrics/statistics_recorder.h" |
15 #include "base/run_loop.h" | 15 #include "base/run_loop.h" |
16 #include "base/strings/string_number_conversions.h" | 16 #include "base/strings/string_number_conversions.h" |
17 #include "base/strings/string_util.h" | 17 #include "base/strings/string_util.h" |
18 #include "base/strings/stringprintf.h" | |
19 #include "base/strings/utf_string_conversions.h" | 18 #include "base/strings/utf_string_conversions.h" |
20 #include "base/time/time.h" | 19 #include "base/time/time.h" |
21 #include "build/build_config.h" | 20 #include "build/build_config.h" |
22 #include "chrome/browser/bookmarks/bookmark_model_factory.h" | 21 #include "chrome/browser/bookmarks/bookmark_model_factory.h" |
23 #include "chrome/browser/chrome_notification_types.h" | 22 #include "chrome/browser/chrome_notification_types.h" |
24 #include "chrome/browser/extensions/extension_browsertest.h" | 23 #include "chrome/browser/extensions/extension_browsertest.h" |
25 #include "chrome/browser/extensions/extension_service.h" | 24 #include "chrome/browser/extensions/extension_service.h" |
26 #include "chrome/browser/history/history_service_factory.h" | 25 #include "chrome/browser/history/history_service_factory.h" |
27 #include "chrome/browser/profiles/profile.h" | 26 #include "chrome/browser/profiles/profile.h" |
28 #include "chrome/browser/search/instant_service.h" | 27 #include "chrome/browser/search/instant_service.h" |
(...skipping 699 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
728 stream << "link.href = \"" << result_url.spec() << "\";"; | 727 stream << "link.href = \"" << result_url.spec() << "\";"; |
729 stream << "document.body.appendChild(link);"; | 728 stream << "document.body.appendChild(link);"; |
730 stream << "link.click();"; | 729 stream << "link.click();"; |
731 EXPECT_TRUE(content::ExecuteScript(contents, stream.str())); | 730 EXPECT_TRUE(content::ExecuteScript(contents, stream.str())); |
732 | 731 |
733 content::WaitForLoadStop(contents); | 732 content::WaitForLoadStop(contents); |
734 std::string expected_title = | 733 std::string expected_title = |
735 "Referrer is " + instant_url().GetWithEmptyPath().spec(); | 734 "Referrer is " + instant_url().GetWithEmptyPath().spec(); |
736 EXPECT_EQ(ASCIIToUTF16(expected_title), contents->GetTitle()); | 735 EXPECT_EQ(ASCIIToUTF16(expected_title), contents->GetTitle()); |
737 } | 736 } |
OLD | NEW |