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

Side by Side Diff: chrome/browser/predictors/autocomplete_action_predictor_unittest.cc

Issue 12456005: Merge 186060 (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1364_152/src/
Patch Set: Created 7 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/prerender/prerender_field_trial.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "chrome/browser/predictors/autocomplete_action_predictor.h" 5 #include "chrome/browser/predictors/autocomplete_action_predictor.h"
6 6
7 #include "base/auto_reset.h" 7 #include "base/auto_reset.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/guid.h" 9 #include "base/guid.h"
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after
336 all_ids.begin(); 336 all_ids.begin();
337 it != all_ids.end(); ++it) { 337 it != all_ids.end(); ++it) {
338 bool in_expected = 338 bool in_expected =
339 (std::find(expected.begin(), expected.end(), *it) != expected.end()); 339 (std::find(expected.begin(), expected.end(), *it) != expected.end());
340 bool in_list = 340 bool in_list =
341 (std::find(id_list.begin(), id_list.end(), *it) != id_list.end()); 341 (std::find(id_list.begin(), id_list.end(), *it) != id_list.end());
342 EXPECT_EQ(in_expected, in_list); 342 EXPECT_EQ(in_expected, in_list);
343 } 343 }
344 } 344 }
345 345
346 TEST_F(AutocompleteActionPredictorTest, RecommendActionURL) { 346 TEST_F(AutocompleteActionPredictorTest, DISABLED_RecommendActionURL) {
347 ASSERT_NO_FATAL_FAILURE(AddAllRows()); 347 ASSERT_NO_FATAL_FAILURE(AddAllRows());
348 348
349 AutocompleteMatch match; 349 AutocompleteMatch match;
350 match.type = AutocompleteMatch::HISTORY_URL; 350 match.type = AutocompleteMatch::HISTORY_URL;
351 351
352 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(test_url_db); ++i) { 352 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(test_url_db); ++i) {
353 match.destination_url = GURL(test_url_db[i].url); 353 match.destination_url = GURL(test_url_db[i].url);
354 EXPECT_EQ(test_url_db[i].expected_action, 354 EXPECT_EQ(test_url_db[i].expected_action,
355 predictor()->RecommendAction(test_url_db[i].user_text, match)) 355 predictor()->RecommendAction(test_url_db[i].user_text, match))
356 << "Unexpected action for " << match.destination_url; 356 << "Unexpected action for " << match.destination_url;
(...skipping 13 matching lines...) Expand all
370 AutocompleteActionPredictor::ACTION_PRERENDER) ? 370 AutocompleteActionPredictor::ACTION_PRERENDER) ?
371 AutocompleteActionPredictor::ACTION_PRECONNECT : 371 AutocompleteActionPredictor::ACTION_PRECONNECT :
372 test_url_db[i].expected_action; 372 test_url_db[i].expected_action;
373 EXPECT_EQ(expected_action, 373 EXPECT_EQ(expected_action,
374 predictor()->RecommendAction(test_url_db[i].user_text, match)) 374 predictor()->RecommendAction(test_url_db[i].user_text, match))
375 << "Unexpected action for " << match.destination_url; 375 << "Unexpected action for " << match.destination_url;
376 } 376 }
377 } 377 }
378 378
379 } // namespace predictors 379 } // namespace predictors
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/prerender/prerender_field_trial.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698