Subject: | Patch: Google changed it's pages |
Fixes for live tests with new Google pages.
-------
Alexandr Ciornii, http://chorny.net
Subject: | back.patch |
*** back.t.dist Fri Jul 15 03:03:06 2005
--- back.t Mon Jul 24 21:33:42 2006
***************
*** 35,41 ****
fields => { 'q' => "perl" },
);
ok( $mech->success, "Searched for Perl" );
! like( $mech->title, qr/^Google Search: perl/, "Right page title" );
is( scalar @{$mech->mech->{page_stack}}, 1, "POST is in the stack" );
$mech->head( "http://www.google.com/" );
--- 35,41 ----
fields => { 'q' => "perl" },
);
ok( $mech->success, "Searched for Perl" );
! like( $mech->title, qr/^perl - Google Search/, "Right page title" );
is( scalar @{$mech->mech->{page_stack}}, 1, "POST is in the stack" );
$mech->head( "http://www.google.com/" );
Subject: | follow_link.patch |
*** follow_link.t.dist Thu Jun 9 00:37:49 2005
--- follow_link.t Mon Jul 24 21:35:04 2006
***************
*** 16,22 ****
$response = $agent->follow_link( text_regex => qr/Advertising.Programs/i );
ok( $response->is_success, 'Got the page' );
! is( $agent->uri, 'http://www.google.com/ads/', "Got the correct page" );
SKIP: {
eval "use Test::Memory::Cycle";
--- 16,22 ----
$response = $agent->follow_link( text_regex => qr/Advertising.Programs/i );
ok( $response->is_success, 'Got the page' );
! is( $agent->uri, 'http://www.google.com/intl/en/ads/', "Got the correct page" );
SKIP: {
eval "use Test::Memory::Cycle";
Subject: | get.patch |
*** get.t.dist Thu Jun 9 00:37:49 2005
--- get.t Mon Jul 24 22:24:05 2006
***************
*** 20,35 ****
isa_ok( $services, 'WWW::Mechanize::Link' );
ok( $agent->get( $services )->is_success, 'Got the ads page' );
! is( $agent->uri, 'http://www.google.com/ads/', "Got relative OK" );
ok( $agent->is_html );
is( $agent->title, "Google Advertising", "Got the right page" );
! ok( $agent->get( '../help/' )->is_success, 'Got the help page' );
is( $agent->uri, 'http://www.google.com/help/', "Got relative OK" );
ok( $agent->is_html );
! is( $agent->title, "Google Help Central", "Title matches" );
! ok( $agent->get( 'basics.html' )->is_success, 'Got the basics page' );
is( $agent->uri, 'http://www.google.com/help/basics.html', "Got relative OK" );
ok( $agent->is_html, "Basics page is HTML" );
is( $agent->title, "Google Help : Basics of Search", "Title matches" );
--- 20,35 ----
isa_ok( $services, 'WWW::Mechanize::Link' );
ok( $agent->get( $services )->is_success, 'Got the ads page' );
! is( $agent->uri, 'http://www.google.com/intl/en/ads/', "Got relative OK" );
ok( $agent->is_html );
is( $agent->title, "Google Advertising", "Got the right page" );
! ok( $agent->get( '../../../help/' )->is_success, 'Got the help page' );
is( $agent->uri, 'http://www.google.com/help/', "Got relative OK" );
ok( $agent->is_html );
! is( $agent->title, "Google: Web Search Help Center", "Title matches" );
! ok( $agent->get( 'help/basics.html' )->is_success, 'Got the basics page' );
is( $agent->uri, 'http://www.google.com/help/basics.html', "Got relative OK" );
ok( $agent->is_html, "Basics page is HTML" );
is( $agent->title, "Google Help : Basics of Search", "Title matches" );