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/message_loop/message_loop.h" |
12 #include "base/metrics/histogram_base.h" | 13 #include "base/metrics/histogram_base.h" |
13 #include "base/metrics/histogram_samples.h" | 14 #include "base/metrics/histogram_samples.h" |
14 #include "base/metrics/statistics_recorder.h" | 15 #include "base/metrics/statistics_recorder.h" |
15 #include "base/run_loop.h" | 16 #include "base/run_loop.h" |
16 #include "base/strings/string_number_conversions.h" | 17 #include "base/strings/string_number_conversions.h" |
17 #include "base/strings/string_util.h" | 18 #include "base/strings/string_util.h" |
18 #include "base/strings/utf_string_conversions.h" | 19 #include "base/strings/utf_string_conversions.h" |
19 #include "base/time/time.h" | 20 #include "base/time/time.h" |
20 #include "build/build_config.h" | 21 #include "build/build_config.h" |
21 #include "chrome/browser/bookmarks/bookmark_model_factory.h" | 22 #include "chrome/browser/bookmarks/bookmark_model_factory.h" |
(...skipping 713 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
735 stream << "link.href = \"" << result_url.spec() << "\";"; | 736 stream << "link.href = \"" << result_url.spec() << "\";"; |
736 stream << "document.body.appendChild(link);"; | 737 stream << "document.body.appendChild(link);"; |
737 stream << "link.click();"; | 738 stream << "link.click();"; |
738 EXPECT_TRUE(content::ExecuteScript(contents, stream.str())); | 739 EXPECT_TRUE(content::ExecuteScript(contents, stream.str())); |
739 | 740 |
740 content::WaitForLoadStop(contents); | 741 content::WaitForLoadStop(contents); |
741 std::string expected_title = | 742 std::string expected_title = |
742 "Referrer is " + instant_url().GetWithEmptyPath().spec(); | 743 "Referrer is " + instant_url().GetWithEmptyPath().spec(); |
743 EXPECT_EQ(ASCIIToUTF16(expected_title), contents->GetTitle()); | 744 EXPECT_EQ(ASCIIToUTF16(expected_title), contents->GetTitle()); |
744 } | 745 } |
OLD | NEW |