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 |