Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(171)

Side by Side Diff: chrome/browser/ui/webui/log_web_ui_url_browsertest.cc

Issue 2318643003: MD History: truncate title to 300 chars in C++ instead of JS (Closed)
Patch Set: more !android Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "chrome/browser/ui/webui/log_web_ui_url.h" 5 #include "chrome/browser/ui/webui/log_web_ui_url.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <vector> 9 #include <vector>
10 10
(...skipping 24 matching lines...) Expand all
35 public: 35 public:
36 LogWebUIUrlTest() {} 36 LogWebUIUrlTest() {}
37 ~LogWebUIUrlTest() override {} 37 ~LogWebUIUrlTest() override {}
38 38
39 std::vector<Bucket> GetSamples() { 39 std::vector<Bucket> GetSamples() {
40 return histogram_tester_.GetAllSamples(webui::kWebUICreatedForUrl); 40 return histogram_tester_.GetAllSamples(webui::kWebUICreatedForUrl);
41 } 41 }
42 42
43 void SetUpOnMainThread() override { 43 void SetUpOnMainThread() override {
44 // Disable MD History to test non-MD history page. 44 // Disable MD History to test non-MD history page.
45 MdHistoryUI::DisableForTesting(); 45 MdHistoryUI::SetEnabledForTesting(false);
46 } 46 }
47 47
48 private: 48 private:
49 base::HistogramTester histogram_tester_; 49 base::HistogramTester histogram_tester_;
50 50
51 DISALLOW_COPY_AND_ASSIGN(LogWebUIUrlTest); 51 DISALLOW_COPY_AND_ASSIGN(LogWebUIUrlTest);
52 }; 52 };
53 53
54 IN_PROC_BROWSER_TEST_F(LogWebUIUrlTest, TestHistoryFrame) { 54 IN_PROC_BROWSER_TEST_F(LogWebUIUrlTest, TestHistoryFrame) {
55 GURL history_frame_url(chrome::kChromeUIHistoryFrameURL); 55 GURL history_frame_url(chrome::kChromeUIHistoryFrameURL);
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 uint32_t extensions_frame_url_hash = base::Hash(extensions_frame_url.spec()); 116 uint32_t extensions_frame_url_hash = base::Hash(extensions_frame_url.spec());
117 117
118 EXPECT_THAT(GetSamples(), ElementsAre(Bucket(extensions_frame_url_hash, 1), 118 EXPECT_THAT(GetSamples(), ElementsAre(Bucket(extensions_frame_url_hash, 1),
119 Bucket(history_frame_url_hash, 2), 119 Bucket(history_frame_url_hash, 2),
120 Bucket(uber_frame_url_hash, 2), 120 Bucket(uber_frame_url_hash, 2),
121 Bucket(uber_url_hash, 2))); 121 Bucket(uber_url_hash, 2)));
122 } 122 }
123 #endif 123 #endif
124 124
125 } // namespace webui 125 } // namespace webui
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/browsing_history_handler_unittest.cc ('k') | chrome/browser/ui/webui/md_history_ui.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698