OLD | NEW |
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/android/data_usage/data_use_ui_tab_model.h" | 5 #include "chrome/browser/android/data_usage/data_use_ui_tab_model.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
(...skipping 471 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
482 std::string(), true, DataUseTabModel::TRANSITION_FORM_SUBMIT}, | 482 std::string(), true, DataUseTabModel::TRANSITION_FORM_SUBMIT}, |
483 {ui::PageTransition(ui::PAGE_TRANSITION_RELOAD | | 483 {ui::PageTransition(ui::PAGE_TRANSITION_RELOAD | |
484 ui::PAGE_TRANSITION_AUTO_SUBFRAME), | 484 ui::PAGE_TRANSITION_AUTO_SUBFRAME), |
485 std::string(), false}, | 485 std::string(), false}, |
486 {ui::PageTransition(ui::PAGE_TRANSITION_RELOAD | | 486 {ui::PageTransition(ui::PAGE_TRANSITION_RELOAD | |
487 ui::PAGE_TRANSITION_MANUAL_SUBFRAME), | 487 ui::PAGE_TRANSITION_MANUAL_SUBFRAME), |
488 std::string(), false}, | 488 std::string(), false}, |
489 | 489 |
490 // Navigating history. | 490 // Navigating history. |
491 {ui::PageTransition(ui::PAGE_TRANSITION_AUTO_TOPLEVEL), | 491 {ui::PageTransition(ui::PAGE_TRANSITION_AUTO_TOPLEVEL), |
492 kChromeUIHistoryFrameURL, true, | |
493 DataUseTabModel::TRANSITION_HISTORY_ITEM}, | |
494 {ui::PageTransition(ui::PAGE_TRANSITION_AUTO_TOPLEVEL), | |
495 kChromeUIHistoryURL, true, DataUseTabModel::TRANSITION_HISTORY_ITEM}, | 492 kChromeUIHistoryURL, true, DataUseTabModel::TRANSITION_HISTORY_ITEM}, |
496 {ui::PageTransition(ui::PAGE_TRANSITION_AUTO_TOPLEVEL), std::string(), | 493 {ui::PageTransition(ui::PAGE_TRANSITION_AUTO_TOPLEVEL), std::string(), |
497 false}, | 494 false}, |
498 }; | 495 }; |
499 | 496 |
500 for (const auto& test : tests) { | 497 for (const auto& test : tests) { |
501 DataUseTabModel::TransitionType transition_type; | 498 DataUseTabModel::TransitionType transition_type; |
502 EXPECT_EQ(test.expected_return, | 499 EXPECT_EQ(test.expected_return, |
503 data_use_ui_tab_model()->ConvertTransitionType( | 500 data_use_ui_tab_model()->ConvertTransitionType( |
504 test.page_transition, GURL(test.url), &transition_type)); | 501 test.page_transition, GURL(test.url), &transition_type)); |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
622 base::RunLoop().RunUntilIdle(); | 619 base::RunLoop().RunUntilIdle(); |
623 RegisterURLRegexes(std::vector<std::string>(url_regexes.size(), kFooPackage), | 620 RegisterURLRegexes(std::vector<std::string>(url_regexes.size(), kFooPackage), |
624 url_regexes, | 621 url_regexes, |
625 std::vector<std::string>(url_regexes.size(), kFooLabel)); | 622 std::vector<std::string>(url_regexes.size(), kFooLabel)); |
626 base::RunLoop().RunUntilIdle(); | 623 base::RunLoop().RunUntilIdle(); |
627 } | 624 } |
628 | 625 |
629 } // namespace android | 626 } // namespace android |
630 | 627 |
631 } // namespace chrome | 628 } // namespace chrome |
OLD | NEW |