| Index: chrome/test/remoting/page_load_notification_observer.cc
|
| diff --git a/chrome/test/remoting/page_load_notification_observer.cc b/chrome/test/remoting/page_load_notification_observer.cc
|
| index 4898680bc8332bd83f61c42421268e0033a509c8..d83200be9246ffb5909f8318679785c3afd3bcd8 100644
|
| --- a/chrome/test/remoting/page_load_notification_observer.cc
|
| +++ b/chrome/test/remoting/page_load_notification_observer.cc
|
| @@ -15,7 +15,8 @@ PageLoadNotificationObserver::PageLoadNotificationObserver(const GURL& target)
|
| content::NOTIFICATION_LOAD_STOP,
|
| base::Bind(&PageLoadNotificationObserver::IsTargetLoaded,
|
| base::Unretained(this))),
|
| - target_(target) {
|
| + target_(target),
|
| + ignore_url_parameters_(false) {
|
| }
|
|
|
| PageLoadNotificationObserver::~PageLoadNotificationObserver() {}
|
| @@ -23,7 +24,15 @@ PageLoadNotificationObserver::~PageLoadNotificationObserver() {}
|
| bool PageLoadNotificationObserver::IsTargetLoaded() {
|
| content::NavigationController* controller =
|
| content::Source<content::NavigationController>(source()).ptr();
|
| - return controller->GetWebContents()->GetURL() == target_;
|
| + GURL current_url = controller->GetWebContents()->GetURL();
|
| + if (ignore_url_parameters_) {
|
| + GURL::Replacements strip_query;
|
| + strip_query.ClearQuery();
|
| + return current_url.ReplaceComponents(strip_query) ==
|
| + target_.ReplaceComponents(strip_query);
|
| + } else {
|
| + return current_url == target_;
|
| + }
|
| }
|
|
|
| } // namespace remoting
|
|
|