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

Unified Diff: athena/content/app_activity_unittest.cc

Issue 694413005: athena: Introduce ActivityView. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: athena/content/app_activity_unittest.cc
diff --git a/athena/content/app_activity_unittest.cc b/athena/content/app_activity_unittest.cc
index 266b940fd4e9ae817b4d98feb64ffd8aec80c50a..b54e4c8b9e9403e92000732eb42aaa38150cbafe 100644
--- a/athena/content/app_activity_unittest.cc
+++ b/athena/content/app_activity_unittest.cc
@@ -160,14 +160,11 @@ class AppActivityTest : public AthenaTestBase {
// Get the position of the activity in the navigation history.
int GetActivityPosition(Activity* activity) {
- aura::Window* window = activity->GetActivityViewModel()->GetContentsView()
- ->GetWidget()->GetNativeWindow();
+ aura::Window* window = activity->GetWindow();
aura::Window::Windows windows = activity->GetWindow()->parent()->children();
oshima 2014/11/04 22:17:04 This will fail if there is a non activity window.
sadrul 2014/11/04 23:26:09 Oops. I meant to move this in a separate patch, si
- for (size_t i = 0; i < windows.size(); i++) {
- if (windows[i] == window)
- return i;
- }
- return -1;
+ aura::Window::Windows::iterator iter =
+ std::find(windows.begin(), windows.end(), window);
+ return iter == windows.end() ? -1 : iter - windows.begin();
}
// To avoid interference of the ResourceManager in these AppActivity

Powered by Google App Engine
This is Rietveld 408576698