| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "content/shell/browser/webkit_test_controller.h" | 5 #include "content/shell/browser/webkit_test_controller.h" |
| 6 | 6 |
| 7 #include <iostream> | 7 #include <iostream> |
| 8 | 8 |
| 9 #include "base/base64.h" | 9 #include "base/base64.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 613 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 624 | 624 |
| 625 RenderViewHost* render_view_host = | 625 RenderViewHost* render_view_host = |
| 626 main_window_->web_contents()->GetRenderViewHost(); | 626 main_window_->web_contents()->GetRenderViewHost(); |
| 627 | 627 |
| 628 for (std::vector<Shell*>::iterator window = Shell::windows().begin(); | 628 for (std::vector<Shell*>::iterator window = Shell::windows().begin(); |
| 629 window != Shell::windows().end(); | 629 window != Shell::windows().end(); |
| 630 ++window) { | 630 ++window) { |
| 631 WebContents* web_contents = (*window)->web_contents(); | 631 WebContents* web_contents = (*window)->web_contents(); |
| 632 // Only capture the history from windows in the same process as the main | 632 // Only capture the history from windows in the same process as the main |
| 633 // window. During layout tests, we only use two processes when an | 633 // window. During layout tests, we only use two processes when an |
| 634 // devtools window is open. This should not happen during history navigation | 634 // devtools window is open. |
| 635 // tests. | |
| 636 if (render_view_host->GetProcess() != | 635 if (render_view_host->GetProcess() != |
| 637 web_contents->GetRenderViewHost()->GetProcess()) { | 636 web_contents->GetRenderViewHost()->GetProcess()) { |
| 638 NOTREACHED(); | |
| 639 continue; | 637 continue; |
| 640 } | 638 } |
| 641 routing_ids.push_back(web_contents->GetRenderViewHost()->GetRoutingID()); | 639 routing_ids.push_back(web_contents->GetRenderViewHost()->GetRoutingID()); |
| 642 current_entry_indexes.push_back( | 640 current_entry_indexes.push_back( |
| 643 web_contents->GetController().GetCurrentEntryIndex()); | 641 web_contents->GetController().GetCurrentEntryIndex()); |
| 644 std::vector<PageState> history; | 642 std::vector<PageState> history; |
| 645 for (int entry = 0; entry < web_contents->GetController().GetEntryCount(); | 643 for (int entry = 0; entry < web_contents->GetController().GetEntryCount(); |
| 646 ++entry) { | 644 ++entry) { |
| 647 PageState state = web_contents->GetController().GetEntryAtIndex(entry)-> | 645 PageState state = web_contents->GetController().GetEntryAtIndex(entry)-> |
| 648 GetPageState(); | 646 GetPageState(); |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 698 | 696 |
| 699 printer_->AddErrorMessage( | 697 printer_->AddErrorMessage( |
| 700 base::StringPrintf("#LEAK - renderer pid %d (%s)", current_pid_, | 698 base::StringPrintf("#LEAK - renderer pid %d (%s)", current_pid_, |
| 701 result.detail.c_str())); | 699 result.detail.c_str())); |
| 702 CHECK(!crash_when_leak_found_); | 700 CHECK(!crash_when_leak_found_); |
| 703 | 701 |
| 704 DiscardMainWindow(); | 702 DiscardMainWindow(); |
| 705 } | 703 } |
| 706 | 704 |
| 707 } // namespace content | 705 } // namespace content |
| OLD | NEW |