diff --git a/core/modules/aggregator/aggregator.module b/core/modules/aggregator/aggregator.module
index bd0c6c1..ff4773f 100644
--- a/core/modules/aggregator/aggregator.module
+++ b/core/modules/aggregator/aggregator.module
@@ -456,10 +456,12 @@ function aggregator_save_category($edit) {
         ->condition('cid', $edit['cid'])
         ->execute();
       // Make sure there is no active block for this category.
-      db_delete('block')
-        ->condition('module', 'aggregator')
-        ->condition('delta', 'category-' . $edit['cid'])
-        ->execute();
+      if (module_exists('block')) {
+        db_delete('block')
+          ->condition('module', 'aggregator')
+          ->condition('delta', 'category-' . $edit['cid'])
+          ->execute();
+      }
       $edit['title'] = '';
       $op = 'delete';
     }
@@ -521,10 +523,12 @@ function aggregator_save_feed($edit) {
       ->condition('fid', $edit['fid'])
       ->execute();
     // Make sure there is no active block for this feed.
-    db_delete('block')
-      ->condition('module', 'aggregator')
-      ->condition('delta', 'feed-' . $edit['fid'])
-      ->execute();
+    if (module_exists('block')) {
+      db_delete('block')
+        ->condition('module', 'aggregator')
+        ->condition('delta', 'feed-' . $edit['fid'])
+        ->execute();
+    }
   }
   elseif (!empty($edit['title'])) {
     $edit['fid'] = db_insert('aggregator_feed')
diff --git a/core/modules/aggregator/aggregator.test b/core/modules/aggregator/aggregator.test
index 522129f..99b4c4a 100644
--- a/core/modules/aggregator/aggregator.test
+++ b/core/modules/aggregator/aggregator.test
@@ -7,7 +7,13 @@
 
 class AggregatorTestCase extends DrupalWebTestCase {
   function setUp() {
-    parent::setUp('aggregator', 'aggregator_test');
+    parent::setUp(array('node', 'block', 'aggregator', 'aggregator_test'));
+
+    // Create an Article node type.
+    if ($this->profile != 'standard') {
+      $this->drupalCreateContentType(array('type' => 'article', 'name' => 'Article'));
+    }
+
     $web_user = $this->drupalCreateUser(array('administer news feeds', 'access news feeds', 'create article content'));
     $this->drupalLogin($web_user);
   }
diff --git a/core/modules/block/block.test b/core/modules/block/block.test
index dbd7dc4..eb078a9 100644
--- a/core/modules/block/block.test
+++ b/core/modules/block/block.test
@@ -6,6 +6,8 @@
  */
 
 class BlockTestCase extends DrupalWebTestCase {
+  protected $profile = 'standard';
+
   protected $regions;
   protected $admin_user;
 
@@ -392,14 +394,19 @@ class NonDefaultBlockAdmin extends DrupalWebTestCase {
     );
   }
 
+  function setUp() {
+    parent::setUp(array('block'));
+  }
+
   /**
    * Test non-default theme admin.
    */
   function testNonDefaultBlockAdmin() {
     $admin_user = $this->drupalCreateUser(array('administer blocks', 'administer themes'));
     $this->drupalLogin($admin_user);
-    theme_enable(array('stark'));
-    $this->drupalGet('admin/structure/block/list/stark');
+    $new_theme = 'bartik';
+    theme_enable(array($new_theme));
+    $this->drupalGet('admin/structure/block/list/' . $new_theme);
   }
 }
 
@@ -415,6 +422,10 @@ class NewDefaultThemeBlocks extends DrupalWebTestCase {
     );
   }
 
+  function setUp() {
+    parent::setUp(array('block'));
+  }
+
   /**
    * Check the enabled Bartik blocks are correctly copied over.
    */
@@ -441,11 +452,12 @@ class NewDefaultThemeBlocks extends DrupalWebTestCase {
       $blocks[$block->module][$block->delta] = $block;
     }
 
-    // Turn on the Stark theme and ensure that it contains all of the blocks
+    // Turn on a new theme and ensure that it contains all of the blocks
     // the default theme had.
-    theme_enable(array('stark'));
-    variable_set('theme_default', 'stark');
-    $result = db_query('SELECT * FROM {block} WHERE theme = :theme', array(':theme' => 'stark'));
+    $new_theme = 'bartik';
+    theme_enable(array($new_theme));
+    variable_set('theme_default', $new_theme);
+    $result = db_query('SELECT * FROM {block} WHERE theme = :theme', array(':theme' => $new_theme));
     foreach ($result as $block) {
       unset($block->theme, $block->bid);
       $this->assertEqual($blocks[$block->module][$block->delta], $block, t('Block %name matched', array('%name' => $block->module . '-' . $block->delta)));
@@ -465,6 +477,10 @@ class BlockAdminThemeTestCase extends DrupalWebTestCase {
     );
   }
 
+  function setUp() {
+    parent::setUp(array('block'));
+  }
+
   /**
    * Check for the accessibility of the admin theme on the  block admin page.
    */
@@ -474,13 +490,13 @@ class BlockAdminThemeTestCase extends DrupalWebTestCase {
     $this->drupalLogin($admin_user);
 
     // Ensure that access to block admin page is denied when theme is disabled.
-    $this->drupalGet('admin/structure/block/list/stark');
+    $this->drupalGet('admin/structure/block/list/bartik');
     $this->assertResponse(403, t('The block admin page for a disabled theme can not be accessed'));
 
     // Enable admin theme and confirm that tab is accessible.
-    $edit['admin_theme'] = 'stark';
+    $edit['admin_theme'] = 'bartik';
     $this->drupalPost('admin/appearance', $edit, t('Save configuration'));
-    $this->drupalGet('admin/structure/block/list/stark');
+    $this->drupalGet('admin/structure/block/list/bartik');
     $this->assertResponse(200, t('The block admin page for the admin theme can be accessed'));
   }
 }
@@ -502,7 +518,7 @@ class BlockCacheTestCase extends DrupalWebTestCase {
   }
 
   function setUp() {
-    parent::setUp('block_test');
+    parent::setUp(array('block', 'block_test'));
 
     // Create an admin user, log in and enable test blocks.
     $this->admin_user = $this->drupalCreateUser(array('administer blocks', 'access administration pages'));
@@ -686,7 +702,7 @@ class BlockHTMLIdTestCase extends DrupalWebTestCase {
   }
 
   function setUp() {
-    parent::setUp('block_test');
+    parent::setUp(array('block', 'block_test'));
 
     // Create an admin user, log in and enable test blocks.
     $this->admin_user = $this->drupalCreateUser(array('administer blocks', 'access administration pages'));
@@ -769,7 +785,23 @@ class BlockHiddenRegionTestCase extends DrupalWebTestCase {
   }
 
   function setUp() {
-    parent::setUp(array('block_test'));
+    parent::setUp(array('block', 'block_test', 'search'));
+
+    // Enable Search block in default theme.
+    db_merge('block')
+      ->key(array(
+        'module' => 'search',
+        'delta' => 'form',
+        'theme' => variable_get('theme_default', 'stark'),
+      ))
+      ->fields(array(
+        'status' => 1,
+        'weight' => -1,
+        'region' => 'sidebar_first',
+        'pages' => '',
+        'cache' => -1,
+      ))
+      ->execute();
   }
 
   /**
@@ -780,6 +812,10 @@ class BlockHiddenRegionTestCase extends DrupalWebTestCase {
     $admin_user = $this->drupalCreateUser(array('administer blocks', 'administer themes', 'search content'));
     $this->drupalLogin($admin_user);
 
+    // Ensure that the search form block is displayed.
+    $this->drupalGet('');
+    $this->assertText('Search', t('Block was displayed on the front page.'));
+
     // Enable "block_test_theme" and set it as the default theme.
     $theme = 'block_test_theme';
     theme_enable(array($theme));
diff --git a/core/modules/book/book.test b/core/modules/book/book.test
index 6b45742..4c7506e 100644
--- a/core/modules/book/book.test
+++ b/core/modules/book/book.test
@@ -24,7 +24,7 @@ class BookTestCase extends DrupalWebTestCase {
   }
 
   function setUp() {
-    parent::setUp(array('book', 'node_access_test'));
+    parent::setUp(array('book', 'block', 'node_access_test'));
 
     // node_access_test requires a node_access_rebuild().
     node_access_rebuild();
diff --git a/core/modules/comment/comment.test b/core/modules/comment/comment.test
index 2771bc4..5425a3f 100644
--- a/core/modules/comment/comment.test
+++ b/core/modules/comment/comment.test
@@ -6,6 +6,8 @@
  */
 
 class CommentHelperCase extends DrupalWebTestCase {
+  protected $profile = 'standard';
+
   protected $admin_user;
   protected $web_user;
   protected $node;
diff --git a/core/modules/dashboard/dashboard.test b/core/modules/dashboard/dashboard.test
index 7cb93f9..e1bad5e 100644
--- a/core/modules/dashboard/dashboard.test
+++ b/core/modules/dashboard/dashboard.test
@@ -15,21 +15,11 @@ class DashboardBlocksTestCase extends DrupalWebTestCase {
   }
 
   function setUp() {
-    parent::setUp();
+    parent::setUp(array('block', 'dashboard'));
 
     // Create and log in an administrative user having access to the dashboard.
     $admin_user = $this->drupalCreateUser(array('access dashboard', 'administer blocks', 'access administration pages', 'administer modules'));
     $this->drupalLogin($admin_user);
-
-    // Make sure that the dashboard is using the same theme as the rest of the
-    // site (and in particular, the same theme used on 403 pages). This forces
-    // the dashboard blocks to be the same for an administrator as for a
-    // regular user, and therefore lets us test that the dashboard blocks
-    // themselves are specifically removed for a user who does not have access
-    // to the dashboard page.
-    theme_enable(array('stark'));
-    variable_set('theme_default', 'stark');
-    variable_set('admin_theme', 'stark');
   }
 
   /**
@@ -62,6 +52,7 @@ class DashboardBlocksTestCase extends DrupalWebTestCase {
    */
   function testDashboardRegions() {
     $dashboard_regions = dashboard_region_descriptions();
+    $this->assertTrue(!empty($dashboard_regions), 'One or more dashboard regions found.');
 
     // Ensure blocks can be placed in dashboard regions.
     $this->drupalGet('admin/dashboard/configure');
@@ -111,6 +102,36 @@ class DashboardBlocksTestCase extends DrupalWebTestCase {
     $this->drupalGet('admin/dashboard');
     $this->assertRaw($custom_block['title'], t('Block still appears on the dashboard.'));
   }
+}
+
+class DashboardBlockAvailabilityTestCase extends DrupalWebTestCase {
+  protected $profile = 'standard';
+
+  public static function getInfo() {
+    return array(
+      'name' => 'Block availability',
+      'description' => 'Test blocks as used by the dashboard.',
+      'group' => 'Dashboard',
+    );
+  }
+
+  function setUp() {
+    parent::setUp();
+
+    // Create and log in an administrative user having access to the dashboard.
+    $admin_user = $this->drupalCreateUser(array('access dashboard', 'administer blocks', 'access administration pages', 'administer modules'));
+    $this->drupalLogin($admin_user);
+
+    // Make sure that the dashboard is using the same theme as the rest of the
+    // site (and in particular, the same theme used on 403 pages). This forces
+    // the dashboard blocks to be the same for an administrator as for a
+    // regular user, and therefore lets us test that the dashboard blocks
+    // themselves are specifically removed for a user who does not have access
+    // to the dashboard page.
+    theme_enable(array('stark'));
+    variable_set('theme_default', 'stark');
+    variable_set('admin_theme', 'stark');
+  }
 
   /**
    * Test that defining a block with ['properties']['administrative'] = TRUE
diff --git a/core/modules/dblog/dblog.test b/core/modules/dblog/dblog.test
index ffd3e8a..0e1dd21 100644
--- a/core/modules/dblog/dblog.test
+++ b/core/modules/dblog/dblog.test
@@ -6,6 +6,8 @@
  */
 
 class DBLogTestCase extends DrupalWebTestCase {
+  protected $profile = 'standard';
+
   protected $big_user;
   protected $any_user;
 
diff --git a/core/modules/field/modules/field_sql_storage/field_sql_storage.test b/core/modules/field/modules/field_sql_storage/field_sql_storage.test
index 773de3d..9c54303 100644
--- a/core/modules/field/modules/field_sql_storage/field_sql_storage.test
+++ b/core/modules/field/modules/field_sql_storage/field_sql_storage.test
@@ -21,7 +21,7 @@ class FieldSqlStorageTestCase extends DrupalWebTestCase {
   }
 
   function setUp() {
-    parent::setUp('field_sql_storage', 'field', 'field_test', 'text');
+    parent::setUp('field_sql_storage', 'field', 'field_test', 'text', 'number');
     $this->field_name = strtolower($this->randomName());
     $this->field = array('field_name' => $this->field_name, 'type' => 'test_field', 'cardinality' => 4);
     $this->field = field_create_field($this->field);
diff --git a/core/modules/field/modules/list/tests/list.test b/core/modules/field/modules/list/tests/list.test
index 765901a..97e29fc 100644
--- a/core/modules/field/modules/list/tests/list.test
+++ b/core/modules/field/modules/list/tests/list.test
@@ -18,7 +18,7 @@ class ListFieldTestCase extends FieldTestCase {
   }
 
   function setUp() {
-    parent::setUp('field_test');
+    parent::setUp(array('list', 'field_test'));
 
     $this->field_name = 'test_list';
     $this->field = array(
@@ -126,7 +126,7 @@ class ListFieldUITestCase extends FieldTestCase {
   }
 
   function setUp() {
-    parent::setUp('field_test', 'field_ui');
+    parent::setUp(array('list', 'field_test', 'taxonomy', 'field_ui'));
 
     // Create test user.
     $admin_user = $this->drupalCreateUser(array('access content', 'administer content types', 'administer taxonomy'));
diff --git a/core/modules/field/modules/options/options.test b/core/modules/field/modules/options/options.test
index ea58f27..df51e07 100644
--- a/core/modules/field/modules/options/options.test
+++ b/core/modules/field/modules/options/options.test
@@ -15,7 +15,7 @@ class OptionsWidgetsTestCase extends FieldTestCase {
   }
 
   function setUp() {
-    parent::setUp('field_test', 'list_test');
+    parent::setUp(array('list', 'field_test', 'list_test', 'taxonomy'));
 
     // Field with cardinality 1.
     $this->card_1 = array(
diff --git a/core/modules/field/modules/text/text.test b/core/modules/field/modules/text/text.test
index 5936937..ae697f9 100644
--- a/core/modules/field/modules/text/text.test
+++ b/core/modules/field/modules/text/text.test
@@ -238,6 +238,8 @@ class TextFieldTestCase extends DrupalWebTestCase {
 }
 
 class TextSummaryTestCase extends DrupalWebTestCase {
+  protected $profile = 'standard';
+
   public static function getInfo() {
     return array(
       'name' => 'Text summary',
@@ -406,6 +408,8 @@ class TextSummaryTestCase extends DrupalWebTestCase {
 }
 
 class TextTranslationTestCase extends DrupalWebTestCase {
+  protected $profile = 'standard';
+
   public static function getInfo() {
     return array(
       'name' => 'Text translation',
diff --git a/core/modules/field_ui/field_ui.test b/core/modules/field_ui/field_ui.test
index 4bb7da9..1dea15b 100644
--- a/core/modules/field_ui/field_ui.test
+++ b/core/modules/field_ui/field_ui.test
@@ -18,7 +18,9 @@ class FieldUITestCase extends DrupalWebTestCase {
     if (isset($modules[0]) && is_array($modules[0])) {
       $modules = $modules[0];
     }
+    $modules[] = 'field_ui';
     $modules[] = 'field_test';
+    $modules[] = 'taxonomy';
     parent::setUp($modules);
 
     // Create test user.
@@ -660,7 +662,11 @@ class FieldUIAlterTestCase extends DrupalWebTestCase {
   }
 
   function setUp() {
-    parent::setUp(array('field_test'));
+    parent::setUp(array('field_ui', 'field_test', 'text', 'list'));
+
+    // Create Article node type.
+    $this->drupalCreateContentType(array('type' => 'page', 'name' => 'Basic page'));
+    $this->drupalCreateContentType(array('type' => 'article', 'name' => 'Article'));
 
     // Create test user.
     $admin_user = $this->drupalCreateUser(array('access content', 'administer content types', 'administer users'));
diff --git a/core/modules/file/tests/file.test b/core/modules/file/tests/file.test
index bad8f99..a99fa5a 100644
--- a/core/modules/file/tests/file.test
+++ b/core/modules/file/tests/file.test
@@ -9,6 +9,8 @@
  * Provides methods specifically for testing File module's field handling.
  */
 class FileFieldTestCase extends DrupalWebTestCase {
+  protected $profile = 'standard';
+
   protected $admin_user;
 
   function setUp() {
diff --git a/core/modules/filter/filter.test b/core/modules/filter/filter.test
index 2bafd47..8bfdf50 100644
--- a/core/modules/filter/filter.test
+++ b/core/modules/filter/filter.test
@@ -161,6 +161,8 @@ class FilterCRUDTestCase extends DrupalWebTestCase {
 }
 
 class FilterAdminTestCase extends DrupalWebTestCase {
+  protected $profile = 'standard';
+
   public static function getInfo() {
     return array(
       'name' => 'Filter administration functionality',
@@ -419,6 +421,8 @@ class FilterFormatAccessTestCase extends DrupalWebTestCase {
   function setUp() {
     parent::setUp();
 
+    $this->drupalCreateContentType(array('type' => 'page', 'name' => 'Basic page'));
+
     // Create a user who can administer text formats, but does not have
     // specific permission to use any of them.
     $this->filter_admin_user = $this->drupalCreateUser(array(
diff --git a/core/modules/forum/forum.test b/core/modules/forum/forum.test
index c7c3d9c..48648a9 100644
--- a/core/modules/forum/forum.test
+++ b/core/modules/forum/forum.test
@@ -27,7 +27,7 @@ class ForumTestCase extends DrupalWebTestCase {
    * Enable modules and create users with specific permissions.
    */
   function setUp() {
-    parent::setUp('taxonomy', 'comment', 'forum');
+    parent::setUp(array('taxonomy', 'comment', 'forum', 'node', 'block', 'menu', 'help'));
     // Create users.
     $this->admin_user = $this->drupalCreateUser(array(
       'access administration pages',
@@ -49,7 +49,7 @@ class ForumTestCase extends DrupalWebTestCase {
       'edit own forum content',
       'delete own forum content',
     ));
-    $this->web_user = $this->drupalCreateUser(array());
+    $this->web_user = $this->drupalCreateUser();
   }
 
   /**
@@ -147,7 +147,7 @@ class ForumTestCase extends DrupalWebTestCase {
     $this->assertFieldByXPath($xpath, '6', t('Number of posts found.'));
 
     // Test loading multiple forum nodes on the front page.
-    $this->drupalLogin($this->drupalCreateUser(array('administer content types', 'create forum content')));
+    $this->drupalLogin($this->drupalCreateUser(array('administer content types', 'create forum content', 'post comments')));
     $this->drupalPost('admin/structure/types/manage/forum', array('node_options[promote]' => 'promote'), t('Save content type'));
     $this->createForumTopic($this->forum, FALSE);
     $this->createForumTopic($this->forum, FALSE);
diff --git a/core/modules/help/help.test b/core/modules/help/help.test
index a37afb2..3e62926 100644
--- a/core/modules/help/help.test
+++ b/core/modules/help/help.test
@@ -9,6 +9,9 @@
  * Tests help display and user access for all modules implementing help.
  */
 class HelpTestCase extends DrupalWebTestCase {
+  // Tests help implementations of many arbitrary core modules.
+  protected $profile = 'standard';
+
   /**
    * The admin user that will be created.
    */
diff --git a/core/modules/image/image.test b/core/modules/image/image.test
index 6fa015e..3ce6392 100644
--- a/core/modules/image/image.test
+++ b/core/modules/image/image.test
@@ -32,7 +32,14 @@ class ImageFieldTestCase extends DrupalWebTestCase {
   protected $admin_user;
 
   function setUp() {
-    parent::setUp('image');
+    parent::setUp(array('node', 'image'));
+
+    // Create Basic page and Article node types.
+    if ($this->profile != 'standard') {
+      $this->drupalCreateContentType(array('type' => 'page', 'name' => 'Basic page'));
+      $this->drupalCreateContentType(array('type' => 'article', 'name' => 'Article'));
+    }
+
     $this->admin_user = $this->drupalCreateUser(array('access content', 'access administration pages', 'administer site configuration', 'administer content types', 'administer nodes', 'create article content', 'edit any article content', 'delete any article content', 'administer image styles'));
     $this->drupalLogin($this->admin_user);
   }
@@ -119,7 +126,7 @@ class ImageStylesPathAndUrlUnitTest extends DrupalWebTestCase {
   }
 
   function setUp() {
-    parent::setUp('image_module_test');
+    parent::setUp(array('image', 'image_module_test'));
 
     $this->style_name = 'style_foo';
     image_style_save(array('name' => $this->style_name));
diff --git a/core/modules/locale/locale.test b/core/modules/locale/locale.test
index 8ff85ed..cf363f7 100644
--- a/core/modules/locale/locale.test
+++ b/core/modules/locale/locale.test
@@ -712,7 +712,7 @@ class LocaleImportFunctionalTest extends DrupalWebTestCase {
   protected $admin_user = NULL;
 
   function setUp() {
-    parent::setUp('locale', 'locale_test');
+    parent::setUp(array('locale', 'locale_test', 'dblog'));
 
     // Set the translation file directory.
     variable_set('locale_translate_file_directory', drupal_get_path('module', 'locale_test'));
@@ -1718,6 +1718,8 @@ class LocalePathFunctionalTest extends DrupalWebTestCase {
 
   function setUp() {
     parent::setUp('locale', 'path');
+
+    $this->drupalCreateContentType(array('type' => 'page', 'name' => 'Basic page'));
   }
 
   /**
@@ -1849,6 +1851,8 @@ class LocalePathFunctionalTest extends DrupalWebTestCase {
  * Functional tests for multilingual support on nodes.
  */
 class LocaleContentFunctionalTest extends DrupalWebTestCase {
+  protected $profile = 'standard';
+
   public static function getInfo() {
     return array(
       'name' => 'Content language settings',
@@ -2100,7 +2104,7 @@ class LocaleUILanguageNegotiationTest extends DrupalWebTestCase {
   }
 
   function setUp() {
-    parent::setUp('locale', 'locale_test');
+    parent::setUp(array('locale', 'locale_test', 'block'));
     require_once DRUPAL_ROOT . '/core/includes/language.inc';
     drupal_load('module', 'locale');
     $admin_user = $this->drupalCreateUser(array('administer languages', 'translate interface', 'access administration pages', 'administer blocks'));
@@ -2538,6 +2542,7 @@ class LocaleMultilingualFieldsFunctionalTest extends DrupalWebTestCase {
  * Functional tests for comment language.
  */
 class LocaleCommentLanguageFunctionalTest extends DrupalWebTestCase {
+  protected $profile = 'standard';
 
   public static function getInfo() {
     return array(
diff --git a/core/modules/menu/menu.test b/core/modules/menu/menu.test
index 437adc2..70d67f0 100644
--- a/core/modules/menu/menu.test
+++ b/core/modules/menu/menu.test
@@ -6,6 +6,8 @@
  */
 
 class MenuTestCase extends DrupalWebTestCase {
+  protected $profile = 'standard';
+
   protected $big_user;
   protected $std_user;
   protected $menu;
@@ -582,6 +584,8 @@ class MenuTestCase extends DrupalWebTestCase {
  * Test menu settings for nodes.
  */
 class MenuNodeTestCase extends DrupalWebTestCase {
+  protected $profile = 'standard';
+
   public static function getInfo() {
     return array(
       'name' => 'Menu settings for nodes',
diff --git a/core/modules/node/node.test b/core/modules/node/node.test
index a04b0e6..1b5aae6 100644
--- a/core/modules/node/node.test
+++ b/core/modules/node/node.test
@@ -5,10 +5,27 @@
  * Tests for node.module.
  */
 
+class NodeWebTestCase extends DrupalWebTestCase {
+  function setUp() {
+    $modules = func_get_args();
+    if (isset($modules[0]) && is_array($modules[0])) {
+      $modules = $modules[0];
+    }
+    $modules[] = 'node';
+    parent::setUp($modules);
+
+    // Create Basic page and Article node types.
+    if ($this->profile != 'standard') {
+      $this->drupalCreateContentType(array('type' => 'page', 'name' => 'Basic page'));
+      $this->drupalCreateContentType(array('type' => 'article', 'name' => 'Article'));
+    }
+  }
+}
+
 /**
  * Tests the node_load_multiple() function.
  */
-class NodeLoadMultipleUnitTest extends DrupalWebTestCase {
+class NodeLoadMultipleUnitTest extends NodeWebTestCase {
 
   public static function getInfo() {
     return array(
@@ -88,7 +105,7 @@ class NodeLoadMultipleUnitTest extends DrupalWebTestCase {
 /**
  * Tests for the hooks invoked during node_load().
  */
-class NodeLoadHooksTestCase extends DrupalWebTestCase {
+class NodeLoadHooksTestCase extends NodeWebTestCase {
   public static function getInfo() {
     return array(
       'name' => 'Node load hooks',
@@ -129,7 +146,7 @@ class NodeLoadHooksTestCase extends DrupalWebTestCase {
   }
 }
 
-class NodeRevisionsTestCase extends DrupalWebTestCase {
+class NodeRevisionsTestCase extends NodeWebTestCase {
   protected $nodes;
   protected $logs;
 
@@ -262,7 +279,7 @@ class NodeRevisionsTestCase extends DrupalWebTestCase {
   }
 }
 
-class PageEditTestCase extends DrupalWebTestCase {
+class PageEditTestCase extends NodeWebTestCase {
   protected $web_user;
   protected $admin_user;
 
@@ -394,7 +411,7 @@ class PageEditTestCase extends DrupalWebTestCase {
   }
 }
 
-class PagePreviewTestCase extends DrupalWebTestCase {
+class PagePreviewTestCase extends NodeWebTestCase {
   public static function getInfo() {
     return array(
       'name' => 'Node preview',
@@ -465,7 +482,7 @@ class PagePreviewTestCase extends DrupalWebTestCase {
   }
 }
 
-class NodeCreationTestCase extends DrupalWebTestCase {
+class NodeCreationTestCase extends NodeWebTestCase {
   public static function getInfo() {
     return array(
       'name' => 'Node creation',
@@ -476,7 +493,7 @@ class NodeCreationTestCase extends DrupalWebTestCase {
 
   function setUp() {
     // Enable dummy module that implements hook_node_insert for exceptions.
-    parent::setUp('node_test_exception');
+    parent::setUp(array('node_test_exception', 'dblog'));
 
     $web_user = $this->drupalCreateUser(array('create page content', 'edit own page content'));
     $this->drupalLogin($web_user);
@@ -543,7 +560,7 @@ class NodeCreationTestCase extends DrupalWebTestCase {
   }
 }
 
-class PageViewTestCase extends DrupalWebTestCase {
+class PageViewTestCase extends NodeWebTestCase {
   public static function getInfo() {
     return array(
       'name' => 'Node edit permissions',
@@ -582,7 +599,7 @@ class PageViewTestCase extends DrupalWebTestCase {
   }
 }
 
-class SummaryLengthTestCase extends DrupalWebTestCase {
+class SummaryLengthTestCase extends NodeWebTestCase {
   public static function getInfo() {
     return array(
       'name' => 'Summary length',
@@ -624,7 +641,7 @@ class SummaryLengthTestCase extends DrupalWebTestCase {
   }
 }
 
-class NodeTitleXSSTestCase extends DrupalWebTestCase {
+class NodeTitleXSSTestCase extends NodeWebTestCase {
   public static function getInfo() {
     return array(
       'name' => 'Node title XSS filtering',
@@ -658,7 +675,7 @@ class NodeTitleXSSTestCase extends DrupalWebTestCase {
   }
 }
 
-class NodeBlockTestCase extends DrupalWebTestCase {
+class NodeBlockTestCase extends NodeWebTestCase {
   public static function getInfo() {
     return array(
       'name' => 'Block availability',
@@ -668,7 +685,7 @@ class NodeBlockTestCase extends DrupalWebTestCase {
   }
 
   function setUp() {
-    parent::setUp();
+    parent::setUp(array('block'));
 
     // Create and login user
     $admin_user = $this->drupalCreateUser(array('administer blocks'));
@@ -691,7 +708,7 @@ class NodeBlockTestCase extends DrupalWebTestCase {
 /**
  * Check that the post information displays when enabled for a content type.
  */
-class NodePostSettingsTestCase extends DrupalWebTestCase {
+class NodePostSettingsTestCase extends NodeWebTestCase {
   public static function getInfo() {
     return array(
       'name' => 'Node post information display',
@@ -726,7 +743,7 @@ class NodePostSettingsTestCase extends DrupalWebTestCase {
 
     // Check that the post information is displayed.
     $node = $this->drupalGetNodeByTitle($edit["title"]);
-    $elements = $this->xpath('//div[contains(@class,:class)]', array(':class' => 'submitted'));
+    $elements = $this->xpath('//*[contains(@class,:class)]', array(':class' => 'submitted'));
     $this->assertEqual(count($elements), 1, t('Post information is displayed.'));
   }
 
@@ -760,7 +777,7 @@ class NodePostSettingsTestCase extends DrupalWebTestCase {
  * added to the node->content array, then verify that the data appears on the
  * sitewide RSS feed at rss.xml.
  */
-class NodeRSSContentTestCase extends DrupalWebTestCase {
+class NodeRSSContentTestCase extends NodeWebTestCase {
   public static function getInfo() {
     return array(
       'name' => 'Node RSS Content',
@@ -821,7 +838,7 @@ class NodeRSSContentTestCase extends DrupalWebTestCase {
  * @todo Cover hook_node_access in a separate test class.
  * hook_node_access_records is covered in another test class.
  */
-class NodeAccessUnitTest extends DrupalWebTestCase {
+class NodeAccessUnitTest extends NodeWebTestCase {
   public static function getInfo() {
     return array(
       'name' => 'Node access',
@@ -888,7 +905,7 @@ class NodeAccessUnitTest extends DrupalWebTestCase {
 /**
  * Test case to verify hook_node_access_records functionality.
  */
-class NodeAccessRecordsUnitTest extends DrupalWebTestCase {
+class NodeAccessRecordsUnitTest extends NodeWebTestCase {
   public static function getInfo() {
     return array(
       'name' => 'Node access records',
@@ -971,7 +988,9 @@ class NodeAccessRecordsUnitTest extends DrupalWebTestCase {
 /**
  * Tests for Node Access with a non-node base table.
  */
-class NodeAccessBaseTableTestCase extends DrupalWebTestCase {
+class NodeAccessBaseTableTestCase extends NodeWebTestCase {
+  // Requires tags taxonomy field.
+  protected $profile = 'standard';
 
   public static function getInfo() {
     return array(
@@ -1130,7 +1149,7 @@ class NodeAccessBaseTableTestCase extends DrupalWebTestCase {
 /**
  * Test case to check node save related functionality, including import-save
  */
-class NodeSaveTestCase extends DrupalWebTestCase {
+class NodeSaveTestCase extends NodeWebTestCase {
 
   public static function getInfo() {
     return array(
@@ -1273,7 +1292,7 @@ class NodeSaveTestCase extends DrupalWebTestCase {
 /**
  * Tests related to node types.
  */
-class NodeTypeTestCase extends DrupalWebTestCase {
+class NodeTypeTestCase extends NodeWebTestCase {
   public static function getInfo() {
     return array(
       'name' => 'Node types',
@@ -1282,6 +1301,10 @@ class NodeTypeTestCase extends DrupalWebTestCase {
     );
   }
 
+  function setUp() {
+    parent::setUp(array('field_ui'));
+  }
+
   /**
    * Ensure that node type functions (node_type_get_*) work correctly.
    *
@@ -1376,7 +1399,7 @@ class NodeTypeTestCase extends DrupalWebTestCase {
     $this->assertRaw('Body', t('Body field was found.'));
 
     // Remove the body field.
-    $this->drupalPost('admin/structure/types/manage/bar/fields/body/delete', NULL, t('Delete'));
+    $this->drupalPost('admin/structure/types/manage/bar/fields/body/delete', array(), t('Delete'));
     // Resave the settings for this type.
     $this->drupalPost('admin/structure/types/manage/bar', array(), t('Save content type'));
     // Check that the body field doesn't exist.
@@ -1427,7 +1450,7 @@ class NodeTypeTestCase extends DrupalWebTestCase {
 /**
  * Test node type customizations persistence.
  */
-class NodeTypePersistenceTestCase extends DrupalWebTestCase {
+class NodeTypePersistenceTestCase extends NodeWebTestCase {
   public static function getInfo() {
     return array(
       'name' => 'Node type persist',
@@ -1503,7 +1526,7 @@ class NodeTypePersistenceTestCase extends DrupalWebTestCase {
 /**
  * Rebuild the node_access table.
  */
-class NodeAccessRebuildTestCase extends DrupalWebTestCase {
+class NodeAccessRebuildTestCase extends NodeWebTestCase {
   public static function getInfo() {
     return array(
       'name' => 'Node access rebuild',
@@ -1531,7 +1554,7 @@ class NodeAccessRebuildTestCase extends DrupalWebTestCase {
 /**
  * Test node administration page functionality.
  */
-class NodeAdminTestCase extends DrupalWebTestCase {
+class NodeAdminTestCase extends NodeWebTestCase {
   public static function getInfo() {
     return array(
       'name' => 'Node administration',
@@ -1696,7 +1719,7 @@ class NodeAdminTestCase extends DrupalWebTestCase {
 /**
  * Test node title.
  */
-class NodeTitleTestCase extends DrupalWebTestCase {
+class NodeTitleTestCase extends NodeWebTestCase {
   protected $admin_user;
 
   public static function getInfo() {
@@ -1708,8 +1731,8 @@ class NodeTitleTestCase extends DrupalWebTestCase {
   }
 
   function setUp() {
-    parent::setUp();
-    $this->admin_user = $this->drupalCreateUser(array('administer nodes', 'create article content', 'create page content'));
+    parent::setUp(array('comment'));
+    $this->admin_user = $this->drupalCreateUser(array('administer nodes', 'create article content', 'create page content', 'post comments'));
     $this->drupalLogin($this->admin_user);
   }
 
@@ -1736,7 +1759,7 @@ class NodeTitleTestCase extends DrupalWebTestCase {
     $this->assertEqual(current($this->xpath($xpath)), $node->title, 'Node breadcrumb is equal to node title.', 'Node');
 
     // Test node title in comment preview.
-    $this->assertEqual(current($this->xpath('//div[@id=:id]/h2/a', array(':id' => 'node-' . $node->nid))), $node->title, 'Node preview title is equal to node title.', 'Node');
+    $this->assertEqual(current($this->xpath('//article[@id=:id]/h2/a', array(':id' => 'node-' . $node->nid))), $node->title, 'Node preview title is equal to node title.', 'Node');
 
     // Test node title is clickable on teaser list (/node).
     $this->drupalGet('node');
@@ -1771,7 +1794,7 @@ class NodeFeedTestCase extends DrupalWebTestCase {
 /**
  * Functional tests for the node module blocks.
  */
-class NodeBlockFunctionalTest extends DrupalWebTestCase {
+class NodeBlockFunctionalTest extends NodeWebTestCase {
   public static function getInfo() {
     return array(
       'name' => 'Node blocks',
@@ -1781,7 +1804,7 @@ class NodeBlockFunctionalTest extends DrupalWebTestCase {
   }
 
   function setUp() {
-    parent::setUp('node', 'block');
+    parent::setUp(array('block'));
 
     // Create users and test node.
     $this->admin_user = $this->drupalCreateUser(array('administer content types', 'administer nodes', 'administer blocks'));
@@ -1944,7 +1967,7 @@ class MultiStepNodeFormBasicOptionsTest extends DrupalWebTestCase {
 /**
  * Test to ensure that a node's content is always rebuilt.
  */
-class NodeBuildContent extends DrupalWebTestCase {
+class NodeBuildContent extends NodeWebTestCase {
 
   public static function getInfo() {
     return array(
@@ -1972,7 +1995,7 @@ class NodeBuildContent extends DrupalWebTestCase {
 /**
  * Tests node_query_node_access_alter().
  */
-class NodeQueryAlter extends DrupalWebTestCase {
+class NodeQueryAlter extends NodeWebTestCase {
 
   public static function getInfo() {
     return array(
@@ -2163,7 +2186,7 @@ class NodeQueryAlter extends DrupalWebTestCase {
 /**
  * Tests node_query_entity_field_access_alter().
  */
-class NodeEntityFieldQueryAlter extends DrupalWebTestCase {
+class NodeEntityFieldQueryAlter extends NodeWebTestCase {
 
   public static function getInfo() {
     return array(
@@ -2227,7 +2250,7 @@ class NodeEntityFieldQueryAlter extends DrupalWebTestCase {
 /**
  * Test node token replacement in strings.
  */
-class NodeTokenReplaceTestCase extends DrupalWebTestCase {
+class NodeTokenReplaceTestCase extends NodeWebTestCase {
   public static function getInfo() {
     return array(
       'name' => 'Node token replacement',
diff --git a/core/modules/openid/openid.test b/core/modules/openid/openid.test
index d873c32..076b812 100644
--- a/core/modules/openid/openid.test
+++ b/core/modules/openid/openid.test
@@ -9,6 +9,37 @@
  * Base class for OpenID tests.
  */
 abstract class OpenIDWebTestCase extends DrupalWebTestCase {
+  function setUp() {
+    $modules = func_get_args();
+    if (isset($modules[0]) && is_array($modules[0])) {
+      $modules = $modules[0];
+    }
+    $modules[] = 'block';
+    $modules[] = 'openid';
+    parent::setUp($modules);
+
+    // Enable user login block.
+    db_merge('block')
+      ->key(array(
+        'module' => 'user',
+        'delta' => 'login',
+        'theme' => variable_get('theme_default', 'stark'),
+      ))
+      ->fields(array(
+        'status' => 1,
+        'weight' => 0,
+        'region' => 'sidebar_first',
+        'pages' => '',
+        'cache' => -1,
+      ))
+      ->execute();
+
+    // Create Basic page and Article node types.
+    if ($this->profile != 'standard') {
+      $this->drupalCreateContentType(array('type' => 'page', 'name' => 'Basic page'));
+      $this->drupalCreateContentType(array('type' => 'article', 'name' => 'Article'));
+    }
+  }
 
   /**
    * Initiates the login procedure using the specified User-supplied Identity.
diff --git a/core/modules/path/path.test b/core/modules/path/path.test
index 8f0406e..21ac283 100644
--- a/core/modules/path/path.test
+++ b/core/modules/path/path.test
@@ -6,6 +6,24 @@
  */
 
 class PathTestCase extends DrupalWebTestCase {
+  function setUp() {
+    $modules = func_get_args();
+    if (isset($modules[0]) && is_array($modules[0])) {
+      $modules = $modules[0];
+    }
+    $modules[] = 'node';
+    $modules[] = 'path';
+    parent::setUp($modules);
+
+    // Create Basic page and Article node types.
+    if ($this->profile != 'standard') {
+      $this->drupalCreateContentType(array('type' => 'page', 'name' => 'Basic page'));
+      $this->drupalCreateContentType(array('type' => 'article', 'name' => 'Article'));
+    }
+  }
+}
+
+class PathAliasTestCase extends PathTestCase {
   public static function getInfo() {
     return array(
       'name' => 'Path alias functionality',
@@ -167,7 +185,7 @@ class PathTestCase extends DrupalWebTestCase {
 /**
  * Test URL aliases for taxonomy terms.
  */
-class PathTaxonomyTermTestCase extends DrupalWebTestCase {
+class PathTaxonomyTermTestCase extends PathTestCase {
   public static function getInfo() {
     return array(
       'name' => 'Taxonomy term URL aliases',
@@ -228,7 +246,7 @@ class PathTaxonomyTermTestCase extends DrupalWebTestCase {
   }
 }
 
-class PathLanguageTestCase extends DrupalWebTestCase {
+class PathLanguageTestCase extends PathTestCase {
   public static function getInfo() {
     return array(
       'name' => 'Path aliases with translated nodes',
@@ -369,7 +387,7 @@ class PathLanguageTestCase extends DrupalWebTestCase {
 /**
  * Tests the user interface for creating path aliases, with languages.
  */
-class PathLanguageUITestCase extends DrupalWebTestCase {
+class PathLanguageUITestCase extends PathTestCase {
   public static function getInfo() {
     return array(
       'name' => 'Path aliases with languages',
@@ -445,7 +463,7 @@ class PathLanguageUITestCase extends DrupalWebTestCase {
 /**
  * Tests that paths are not prefixed on a monolingual site.
  */
-class PathMonolingualTestCase extends DrupalWebTestCase {
+class PathMonolingualTestCase extends PathTestCase {
   public static function getInfo() {
     return array(
       'name' => 'Paths on non-English monolingual sites',
diff --git a/core/modules/poll/poll.test b/core/modules/poll/poll.test
index 20a4678..1763e1b 100644
--- a/core/modules/poll/poll.test
+++ b/core/modules/poll/poll.test
@@ -357,7 +357,7 @@ class PollBlockTestCase extends PollTestCase {
   }
 
   function setUp() {
-    parent::setUp('poll');
+    parent::setUp(array('poll', 'block'));
 
     // Create and login user
     $admin_user = $this->drupalCreateUser(array('administer blocks'));
diff --git a/core/modules/rdf/rdf.test b/core/modules/rdf/rdf.test
index 1344ded..2132f53 100644
--- a/core/modules/rdf/rdf.test
+++ b/core/modules/rdf/rdf.test
@@ -42,6 +42,8 @@ class RdfMappingHookTestCase extends DrupalWebTestCase {
  * Test RDFa markup generation.
  */
 class RdfRdfaMarkupTestCase extends DrupalWebTestCase {
+  protected $profile = 'standard';
+
   public static function getInfo() {
     return array(
       'name' => 'RDFa markup',
@@ -277,6 +279,8 @@ class RdfCrudTestCase extends DrupalWebTestCase {
 }
 
 class RdfMappingDefinitionTestCase extends TaxonomyWebTestCase {
+  protected $profile = 'standard';
+
   public static function getInfo() {
     return array(
       'name' => 'RDF mapping definition functionality',
@@ -573,6 +577,8 @@ class RdfCommentAttributesTestCase extends CommentHelperCase {
 }
 
 class RdfTrackerAttributesTestCase extends DrupalWebTestCase {
+  protected $profile = 'standard';
+
   public static function getInfo() {
     return array(
       'name' => 'RDF tracker page mapping',
diff --git a/core/modules/rdf/tests/rdf_test.info b/core/modules/rdf/tests/rdf_test.info
index b168815..87a6dac 100644
--- a/core/modules/rdf/tests/rdf_test.info
+++ b/core/modules/rdf/tests/rdf_test.info
@@ -4,3 +4,4 @@ package = Testing
 version = VERSION
 core = 8.x
 hidden = TRUE
+dependencies[] = rdf
diff --git a/core/modules/search/search.test b/core/modules/search/search.test
index 6909efd..f04890a 100644
--- a/core/modules/search/search.test
+++ b/core/modules/search/search.test
@@ -11,7 +11,26 @@ const SEARCH_TYPE = '_test_';
 const SEARCH_TYPE_2 = '_test2_';
 const SEARCH_TYPE_JPN = '_test3_';
 
-class SearchMatchTestCase extends DrupalWebTestCase {
+class SearchWebTestCase extends DrupalWebTestCase {
+  function setUp() {
+    $modules = func_get_args();
+    if (isset($modules[0]) && is_array($modules[0])) {
+      $modules = $modules[0];
+    }
+    $modules[] = 'node';
+    $modules[] = 'search';
+    $modules[] = 'dblog';
+    parent::setUp($modules);
+
+    // Create Basic page and Article node types.
+    if ($this->profile != 'standard') {
+      $this->drupalCreateContentType(array('type' => 'page', 'name' => 'Basic page'));
+      $this->drupalCreateContentType(array('type' => 'article', 'name' => 'Article'));
+    }
+  }
+}
+
+class SearchMatchTestCase extends SearchWebTestCase {
   public static function getInfo() {
     return array(
       'name' => 'Search engine queries',
@@ -21,13 +40,6 @@ class SearchMatchTestCase extends DrupalWebTestCase {
   }
 
   /**
-   * Implementation setUp().
-   */
-  function setUp() {
-    parent::setUp('search');
-  }
-
-  /**
    * Test search indexing.
    */
   function testMatching() {
@@ -243,7 +255,7 @@ class SearchMatchTestCase extends DrupalWebTestCase {
 /**
  * Tests the bike shed text on no results page, and text on the search page.
  */
-class SearchPageText extends DrupalWebTestCase {
+class SearchPageText extends SearchWebTestCase {
   protected $searching_user;
 
   public static function getInfo() {
@@ -255,7 +267,7 @@ class SearchPageText extends DrupalWebTestCase {
   }
 
   function setUp() {
-    parent::setUp('search');
+    parent::setUp();
 
     // Create user.
     $this->searching_user = $this->drupalCreateUser(array('search content', 'access user profiles'));
@@ -307,7 +319,7 @@ class SearchPageText extends DrupalWebTestCase {
   }
 }
 
-class SearchAdvancedSearchForm extends DrupalWebTestCase {
+class SearchAdvancedSearchForm extends SearchWebTestCase {
   protected $node;
 
   public static function getInfo() {
@@ -319,7 +331,7 @@ class SearchAdvancedSearchForm extends DrupalWebTestCase {
   }
 
   function setUp() {
-    parent::setUp('search');
+    parent::setUp();
     // Create and login user.
     $test_user = $this->drupalCreateUser(array('access content', 'search content', 'use advanced search', 'administer nodes'));
     $this->drupalLogin($test_user);
@@ -370,7 +382,7 @@ class SearchAdvancedSearchForm extends DrupalWebTestCase {
   }
 }
 
-class SearchRankingTestCase extends DrupalWebTestCase {
+class SearchRankingTestCase extends SearchWebTestCase {
   public static function getInfo() {
     return array(
       'name' => 'Search engine ranking',
@@ -379,16 +391,13 @@ class SearchRankingTestCase extends DrupalWebTestCase {
     );
   }
 
-  /**
-   * Implementation setUp().
-   */
   function setUp() {
-    parent::setUp('search', 'statistics', 'comment');
+    parent::setUp(array('statistics', 'comment'));
   }
 
   function testRankings() {
     // Login with sufficient privileges.
-    $this->drupalLogin($this->drupalCreateUser(array('skip comment approval', 'create page content')));
+    $this->drupalLogin($this->drupalCreateUser(array('post comments', 'skip comment approval', 'create page content')));
 
     // Build a list of the rankings to test.
     $node_ranks = array('sticky', 'promote', 'relevance', 'recent', 'comments', 'views');
@@ -462,6 +471,13 @@ class SearchRankingTestCase extends DrupalWebTestCase {
    * Test rankings of HTML tags.
    */
   function testHTMLRankings() {
+    $full_html_format = array(
+      'format' => 'full_html',
+      'name' => 'Full HTML',
+    );
+    $full_html_format = (object) $full_html_format;
+    filter_format_save($full_html_format);
+
     // Login with sufficient privileges.
     $this->drupalLogin($this->drupalCreateUser(array('create page content')));
 
@@ -580,7 +596,7 @@ class SearchRankingTestCase extends DrupalWebTestCase {
   }
 }
 
-class SearchBlockTestCase extends DrupalWebTestCase {
+class SearchBlockTestCase extends SearchWebTestCase {
   public static function getInfo() {
     return array(
       'name' => 'Block availability',
@@ -590,7 +606,7 @@ class SearchBlockTestCase extends DrupalWebTestCase {
   }
 
   function setUp() {
-    parent::setUp('search');
+    parent::setUp(array('block'));
 
     // Create and login user
     $admin_user = $this->drupalCreateUser(array('administer blocks', 'search content'));
@@ -660,7 +676,7 @@ class SearchBlockTestCase extends DrupalWebTestCase {
 /**
  * Tests that searching for a phrase gets the correct page count.
  */
-class SearchExactTestCase extends DrupalWebTestCase {
+class SearchExactTestCase extends SearchWebTestCase {
   public static function getInfo() {
     return array(
       'name' => 'Search engine phrase queries',
@@ -669,10 +685,6 @@ class SearchExactTestCase extends DrupalWebTestCase {
     );
   }
 
-  function setUp() {
-    parent::setUp('search');
-  }
-
   /**
    * Tests that the correct number of pager links are found for both keywords and phrases.
    */
@@ -721,7 +733,9 @@ class SearchExactTestCase extends DrupalWebTestCase {
 /**
  * Test integration searching comments.
  */
-class SearchCommentTestCase extends DrupalWebTestCase {
+class SearchCommentTestCase extends SearchWebTestCase {
+  protected $profile = 'standard';
+
   protected $admin_user;
 
   public static function getInfo() {
@@ -733,7 +747,7 @@ class SearchCommentTestCase extends DrupalWebTestCase {
   }
 
   function setUp() {
-    parent::setUp('comment', 'search');
+    parent::setUp(array('comment'));
 
     // Create and log in an administrative user having access to the Full HTML
     // text format.
@@ -1017,7 +1031,10 @@ class SearchExpressionInsertExtractTestCase extends DrupalUnitTestCase {
  *     only when there are comments
  * - Nodes with comment status set to Hidden should never show comment counts
  */
-class SearchCommentCountToggleTestCase extends DrupalWebTestCase {
+class SearchCommentCountToggleTestCase extends SearchWebTestCase {
+  // Requires node types, comment config, filter formats.
+  protected $profile = 'standard';
+
   protected $searching_user;
   protected $searchable_nodes;
 
@@ -1030,7 +1047,7 @@ class SearchCommentCountToggleTestCase extends DrupalWebTestCase {
   }
 
   function setUp() {
-    parent::setUp('search');
+    parent::setUp(array('comment'));
 
     // Create searching user.
     $this->searching_user = $this->drupalCreateUser(array('search content', 'access content', 'access comments', 'skip comment approval'));
@@ -1102,7 +1119,7 @@ class SearchCommentCountToggleTestCase extends DrupalWebTestCase {
 /**
  * Test search_simplify() on every Unicode character, and some other cases.
  */
-class SearchSimplifyTestCase extends DrupalWebTestCase {
+class SearchSimplifyTestCase extends SearchWebTestCase {
   public static function getInfo() {
     return array(
       'name' => 'Search simplify',
@@ -1185,8 +1202,7 @@ class SearchSimplifyTestCase extends DrupalWebTestCase {
 /**
  * Tests keywords and conditions.
  */
-class SearchKeywordsConditions extends DrupalWebTestCase {
-
+class SearchKeywordsConditions extends SearchWebTestCase {
   public static function getInfo() {
     return array(
       'name' => 'Keywords and conditions',
@@ -1196,7 +1212,7 @@ class SearchKeywordsConditions extends DrupalWebTestCase {
   }
 
   function setUp() {
-    parent::setUp('search', 'search_extra_type');
+    parent::setUp(array('comment', 'search_extra_type'));
     // Create searching user.
     $this->searching_user = $this->drupalCreateUser(array('search content', 'access content', 'access comments', 'skip comment approval'));
     // Login with sufficient privileges.
@@ -1236,7 +1252,7 @@ class SearchKeywordsConditions extends DrupalWebTestCase {
 /**
  * Tests that numbers can be searched.
  */
-class SearchNumbersTestCase extends DrupalWebTestCase {
+class SearchNumbersTestCase extends SearchWebTestCase {
   protected $test_user;
   protected $numbers;
   protected $nodes;
@@ -1250,7 +1266,7 @@ class SearchNumbersTestCase extends DrupalWebTestCase {
   }
 
   function setUp() {
-    parent::setUp('search');
+    parent::setUp();
 
     $this->test_user = $this->drupalCreateUser(array('search content', 'access content', 'administer nodes', 'access site reports'));
     $this->drupalLogin($this->test_user);
@@ -1324,7 +1340,7 @@ class SearchNumbersTestCase extends DrupalWebTestCase {
 /**
  * Tests that numbers can be searched, with more complex matching.
  */
-class SearchNumberMatchingTestCase extends DrupalWebTestCase {
+class SearchNumberMatchingTestCase extends SearchWebTestCase {
   protected $test_user;
   protected $numbers;
   protected $nodes;
@@ -1338,7 +1354,7 @@ class SearchNumberMatchingTestCase extends DrupalWebTestCase {
   }
 
   function setUp() {
-    parent::setUp('search');
+    parent::setUp();
 
     $this->test_user = $this->drupalCreateUser(array('search content', 'access content', 'administer nodes', 'access site reports'));
     $this->drupalLogin($this->test_user);
@@ -1407,7 +1423,7 @@ class SearchNumberMatchingTestCase extends DrupalWebTestCase {
 /**
  * Test config page.
  */
-class SearchConfigSettingsForm extends DrupalWebTestCase {
+class SearchConfigSettingsForm extends SearchWebTestCase {
   public $search_user;
   public $search_node;
 
@@ -1420,7 +1436,7 @@ class SearchConfigSettingsForm extends DrupalWebTestCase {
   }
 
   function setUp() {
-    parent::setUp('search', 'search_extra_type');
+    parent::setUp(array('block', 'search_extra_type'));
 
     // Login as a user that can create and search content.
     $this->search_user = $this->drupalCreateUser(array('search content', 'administer search', 'administer nodes', 'bypass node access', 'access user profiles', 'administer users', 'administer blocks'));
@@ -1639,7 +1655,7 @@ class SearchExcerptTestCase extends DrupalUnitTestCase {
 /**
  * Test the CJK tokenizer.
  */
-class SearchTokenizerTestCase extends DrupalWebTestCase {
+class SearchTokenizerTestCase extends SearchWebTestCase {
   public static function getInfo() {
     return array(
       'name' => 'CJK tokenizer',
@@ -1648,10 +1664,6 @@ class SearchTokenizerTestCase extends DrupalWebTestCase {
     );
   }
 
-  function setUp() {
-    parent::setUp('search');
-  }
-
   /**
    * Verifies that strings of CJK characters are tokenized.
    *
@@ -1790,7 +1802,7 @@ class SearchTokenizerTestCase extends DrupalWebTestCase {
 /**
  * Tests that we can embed a form in search results and submit it.
  */
-class SearchEmbedForm extends DrupalWebTestCase {
+class SearchEmbedForm extends SearchWebTestCase {
   /**
    * Node used for testing.
    */
@@ -1810,7 +1822,7 @@ class SearchEmbedForm extends DrupalWebTestCase {
   }
 
   function setUp() {
-    parent::setUp('search', 'search_embedded_form');
+    parent::setUp(array('search_embedded_form'));
 
     // Create a user and a node, and update the search index.
     $test_user = $this->drupalCreateUser(array('access content', 'search content', 'administer nodes'));
@@ -1866,7 +1878,7 @@ class SearchEmbedForm extends DrupalWebTestCase {
 /**
  * Tests that hook_search_page runs.
  */
-class SearchPageOverride extends DrupalWebTestCase {
+class SearchPageOverride extends SearchWebTestCase {
   public $search_user;
 
   public static function getInfo() {
@@ -1878,7 +1890,7 @@ class SearchPageOverride extends DrupalWebTestCase {
   }
 
   function setUp() {
-    parent::setUp('search', 'search_extra_type');
+    parent::setUp(array('search_extra_type'));
 
     // Login as a user that can create and search content.
     $this->search_user = $this->drupalCreateUser(array('search content', 'administer search'));
@@ -1900,7 +1912,7 @@ class SearchPageOverride extends DrupalWebTestCase {
 /**
  * Test node search with multiple languages.
  */
-class SearchLanguageTestCase extends DrupalWebTestCase {
+class SearchLanguageTestCase extends SearchWebTestCase {
   public static function getInfo() {
     return array(
       'name' => 'Search language selection',
@@ -1909,11 +1921,8 @@ class SearchLanguageTestCase extends DrupalWebTestCase {
     );
   }
 
-  /**
-   * Implementation setUp().
-   */
   function setUp() {
-    parent::setUp('search', 'locale');
+    parent::setUp(array('locale'));
 
     // Create and login user.
     $test_user = $this->drupalCreateUser(array('access content', 'search content', 'use advanced search', 'administer nodes', 'administer languages', 'access administration pages'));
@@ -1965,7 +1974,7 @@ class SearchLanguageTestCase extends DrupalWebTestCase {
 /**
  * Tests node search with node access control.
  */
-class SearchNodeAccessTest extends DrupalWebTestCase {
+class SearchNodeAccessTest extends SearchWebTestCase {
   public $test_user;
 
   public static function getInfo() {
@@ -1977,7 +1986,7 @@ class SearchNodeAccessTest extends DrupalWebTestCase {
   }
 
   function setUp() {
-    parent::setUp('search', 'node_access_test');
+    parent::setUp(array('node_access_test'));
     node_access_rebuild();
 
     // Create a test user and log in.
diff --git a/core/modules/shortcut/shortcut.install b/core/modules/shortcut/shortcut.install
index 60ee6be..fd6cfe4 100644
--- a/core/modules/shortcut/shortcut.install
+++ b/core/modules/shortcut/shortcut.install
@@ -29,7 +29,13 @@ function shortcut_install() {
   // set, to make sure the links defined above can be correctly saved. (During
   // installation, the menu might not have been built at all yet, or it might
   // have been built but without the node module's links in it.)
-  if (drupal_installation_attempted()) {
+  // drupal_installation_attempted() cannot be used here, as it relies on the
+  // MAINTENANCE_MODE constant value, which cannot be set when running tests, so
+  // we check the 'install_task' variable instead, which is only "done" when
+  // Drupal is already installed (i.e., we are not in the installer).
+  // @todo Use the non-interactive installer for running tests, see
+  //   http://drupal.org/node/1215104
+  if (variable_get('install_task', '') != 'done') {
     menu_rebuild();
   }
   shortcut_set_save($shortcut_set);
diff --git a/core/modules/shortcut/shortcut.test b/core/modules/shortcut/shortcut.test
index 322c63f..f8b16dc 100644
--- a/core/modules/shortcut/shortcut.test
+++ b/core/modules/shortcut/shortcut.test
@@ -32,6 +32,13 @@ class ShortcutTestCase extends DrupalWebTestCase {
 
   function setUp() {
     parent::setUp('toolbar', 'shortcut');
+
+    // Create Basic page and Article node types.
+    if ($this->profile != 'standard') {
+      $this->drupalCreateContentType(array('type' => 'page', 'name' => 'Basic page'));
+      $this->drupalCreateContentType(array('type' => 'article', 'name' => 'Article'));
+    }
+
     // Create users.
     $this->admin_user = $this->drupalCreateUser(array('access toolbar', 'administer shortcuts', 'view the administration theme', 'create article content', 'create page content', 'access content overview'));
     $this->shortcut_user = $this->drupalCreateUser(array('customize shortcut links', 'switch shortcut sets'));
diff --git a/core/modules/simpletest/drupal_web_test_case.php b/core/modules/simpletest/drupal_web_test_case.php
index 0edd3fd..f034387 100644
--- a/core/modules/simpletest/drupal_web_test_case.php
+++ b/core/modules/simpletest/drupal_web_test_case.php
@@ -765,7 +765,7 @@ class DrupalWebTestCase extends DrupalTestCase {
    *
    * @var string
    */
-  protected $profile = 'standard';
+  protected $profile = 'testing';
 
   /**
    * The URL currently loaded in the internal browser.
@@ -1355,6 +1355,13 @@ class DrupalWebTestCase extends DrupalTestCase {
     $test_info['test_run_id'] = $this->databasePrefix;
     $test_info['in_child_site'] = FALSE;
 
+    // Preset the 'install_profile' system variable, so the first call into
+    // system_rebuild_module_data() (in drupal_install_system()) will register
+    // the test's profile as a module. Without this, the installation profile of
+    // the parent site (executing the test) is registered, and the test
+    // profile's hook_install() and other hook implementations are never invoked.
+    $conf['install_profile'] = $this->profile;
+
     include_once DRUPAL_ROOT . '/core/includes/install.inc';
     drupal_install_system();
 
diff --git a/core/modules/simpletest/simpletest.test b/core/modules/simpletest/simpletest.test
index 716b36e..4ea8cc2 100644
--- a/core/modules/simpletest/simpletest.test
+++ b/core/modules/simpletest/simpletest.test
@@ -20,10 +20,9 @@ class SimpleTestFunctionalTest extends DrupalWebTestCase {
   public static function getInfo() {
     return array(
       'name' => 'SimpleTest functionality',
-      'description' => 'Test SimpleTest\'s web interface: check that the intended tests were
-                          run and ensure that test reports display the intended results. Also
-                          test SimpleTest\'s internal browser and API\'s both explicitly and
-                          implicitly.',
+      // @todo Escaped quotes in this description break the class registry
+      //   parser; it seems to cancel processing of this entire file.
+      'description' => "Test SimpleTest's web interface: check that the intended tests were run and ensure that test reports display the intended results. Also test SimpleTest's internal browser and API's both explicitly and simplicitly.",
       'group' => 'SimpleTest'
     );
   }
@@ -75,7 +74,9 @@ class SimpleTestFunctionalTest extends DrupalWebTestCase {
         'pass' => $user->pass_raw
       );
       variable_set('simpletest_maximum_redirects', 1);
-      $this->drupalPost('user?destination=user/logout', $edit, t('Log in'));
+      $this->drupalPost('user', $edit, t('Log in'), array(
+        'query' => array('destination' => 'user/logout'),
+      ));
       $headers = $this->drupalGetHeaders(TRUE);
       $this->assertEqual(count($headers), 2, t('Simpletest stopped following redirects after the first one.'));
     }
diff --git a/core/modules/simpletest/tests/ajax.test b/core/modules/simpletest/tests/ajax.test
index 9a76b96..d502b23 100644
--- a/core/modules/simpletest/tests/ajax.test
+++ b/core/modules/simpletest/tests/ajax.test
@@ -58,8 +58,6 @@ class AJAXTestCase extends DrupalWebTestCase {
  * Tests primary Ajax framework functions.
  */
 class AJAXFrameworkTestCase extends AJAXTestCase {
-  protected $profile = 'testing';
-
   public static function getInfo() {
     return array(
       'name' => 'AJAX framework',
@@ -384,6 +382,8 @@ class AJAXFormValuesTestCase extends AJAXTestCase {
  * Tests that Ajax-enabled forms work when multiple instances of the same form are on a page.
  */
 class AJAXMultiFormTestCase extends AJAXTestCase {
+  protected $profile = 'standard';
+
   public static function getInfo() {
     return array(
       'name' => 'AJAX multi form',
diff --git a/core/modules/simpletest/tests/common.test b/core/modules/simpletest/tests/common.test
index 8936808..8acbd9e 100644
--- a/core/modules/simpletest/tests/common.test
+++ b/core/modules/simpletest/tests/common.test
@@ -18,7 +18,7 @@ class DrupalAlterTestCase extends DrupalWebTestCase {
   }
 
   function setUp() {
-    parent::setUp('common_test');
+    parent::setUp(array('block', 'common_test'));
   }
 
   function testDrupalAlter() {
@@ -2196,11 +2196,6 @@ class ParseInfoFilesTestCase extends DrupalWebTestCase {
  * Tests for the drupal_system_listing() function.
  */
 class DrupalSystemListingTestCase extends DrupalWebTestCase {
-  /**
-   * Use the testing profile; this is needed for testDirectoryPrecedence().
-   */
-  protected $profile = 'testing';
-
   public static function getInfo() {
     return array(
       'name' => 'Drupal system listing',
diff --git a/core/modules/simpletest/tests/database_test.test b/core/modules/simpletest/tests/database_test.test
index 6e55fbd..164ddce 100644
--- a/core/modules/simpletest/tests/database_test.test
+++ b/core/modules/simpletest/tests/database_test.test
@@ -16,8 +16,6 @@ class FakeRecord { }
  * here.
  */
 class DatabaseTestCase extends DrupalWebTestCase {
-  protected $profile = 'testing';
-
   function setUp() {
     parent::setUp('database_test');
 
diff --git a/core/modules/simpletest/tests/file.test b/core/modules/simpletest/tests/file.test
index 7496902..b9da7d9 100644
--- a/core/modules/simpletest/tests/file.test
+++ b/core/modules/simpletest/tests/file.test
@@ -558,6 +558,13 @@ class RemoteFileUnmanagedSaveDataTest extends FileUnmanagedSaveDataTest {
   function setUp() {
     parent::setUp('file_test');
     variable_set('file_default_scheme', 'dummy-remote');
+
+    // Make sure that custom stream wrappers are registered.
+    // @todo This has the potential to be a major bug deeply buried in File API;
+    //   file_unmanaged_*() API functions and test functions are invoking native
+    //   PHP functions directly, whereas Drupal's custom stream wrappers are not
+    //   registered yet.
+    file_get_stream_wrappers();
   }
 }
 
@@ -894,6 +901,13 @@ class RemoteFileSaveUploadTest extends FileSaveUploadTest {
   function setUp() {
     parent::setUp('file_test');
     variable_set('file_default_scheme', 'dummy-remote');
+
+    // Make sure that custom stream wrappers are registered.
+    // @todo This has the potential to be a major bug deeply buried in File API;
+    //   file_unmanaged_*() API functions and test functions are invoking native
+    //   PHP functions directly, whereas Drupal's custom stream wrappers are not
+    //   registered yet.
+    file_get_stream_wrappers();
   }
 }
 
@@ -1033,6 +1047,13 @@ class RemoteFileDirectoryTest extends FileDirectoryTest {
   function setUp() {
     parent::setUp('file_test');
     variable_set('file_default_scheme', 'dummy-remote');
+
+    // Make sure that custom stream wrappers are registered.
+    // @todo This has the potential to be a major bug deeply buried in File API;
+    //   file_unmanaged_*() API functions and test functions are invoking native
+    //   PHP functions directly, whereas Drupal's custom stream wrappers are not
+    //   registered yet.
+    file_get_stream_wrappers();
   }
 }
 
@@ -1178,6 +1199,13 @@ class RemoteFileScanDirectoryTest extends FileScanDirectoryTest {
   function setUp() {
     parent::setUp('file_test');
     variable_set('file_default_scheme', 'dummy-remote');
+
+    // Make sure that custom stream wrappers are registered.
+    // @todo This has the potential to be a major bug deeply buried in File API;
+    //   file_unmanaged_*() API functions and test functions are invoking native
+    //   PHP functions directly, whereas Drupal's custom stream wrappers are not
+    //   registered yet.
+    file_get_stream_wrappers();
   }
 }
 
@@ -1239,6 +1267,13 @@ class RemoteFileUnmanagedDeleteTest extends FileUnmanagedDeleteTest {
   function setUp() {
     parent::setUp('file_test');
     variable_set('file_default_scheme', 'dummy-remote');
+
+    // Make sure that custom stream wrappers are registered.
+    // @todo This has the potential to be a major bug deeply buried in File API;
+    //   file_unmanaged_*() API functions and test functions are invoking native
+    //   PHP functions directly, whereas Drupal's custom stream wrappers are not
+    //   registered yet.
+    file_get_stream_wrappers();
   }
 }
 
@@ -1331,6 +1366,13 @@ class RemoteFileUnmanagedDeleteRecursiveTest extends FileUnmanagedDeleteRecursiv
   function setUp() {
     parent::setUp('file_test');
     variable_set('file_default_scheme', 'dummy-remote');
+
+    // Make sure that custom stream wrappers are registered.
+    // @todo This has the potential to be a major bug deeply buried in File API;
+    //   file_unmanaged_*() API functions and test functions are invoking native
+    //   PHP functions directly, whereas Drupal's custom stream wrappers are not
+    //   registered yet.
+    file_get_stream_wrappers();
   }
 }
 
@@ -1419,6 +1461,13 @@ class RemoteFileUnmanagedMoveTest extends FileUnmanagedMoveTest {
   function setUp() {
     parent::setUp('file_test');
     variable_set('file_default_scheme', 'dummy-remote');
+
+    // Make sure that custom stream wrappers are registered.
+    // @todo This has the potential to be a major bug deeply buried in File API;
+    //   file_unmanaged_*() API functions and test functions are invoking native
+    //   PHP functions directly, whereas Drupal's custom stream wrappers are not
+    //   registered yet.
+    file_get_stream_wrappers();
   }
 }
 
@@ -1523,6 +1572,13 @@ class RemoteFileUnmanagedCopyTest extends FileUnmanagedCopyTest {
   function setUp() {
     parent::setUp('file_test');
     variable_set('file_default_scheme', 'dummy-remote');
+
+    // Make sure that custom stream wrappers are registered.
+    // @todo This has the potential to be a major bug deeply buried in File API;
+    //   file_unmanaged_*() API functions and test functions are invoking native
+    //   PHP functions directly, whereas Drupal's custom stream wrappers are not
+    //   registered yet.
+    file_get_stream_wrappers();
   }
 }
 
diff --git a/core/modules/simpletest/tests/form.test b/core/modules/simpletest/tests/form.test
index 94dfa87..de012e9 100644
--- a/core/modules/simpletest/tests/form.test
+++ b/core/modules/simpletest/tests/form.test
@@ -16,7 +16,17 @@ class FormsTestCase extends DrupalWebTestCase {
   }
 
   function setUp() {
-    parent::setUp('form_test');
+    parent::setUp(array('form_test', 'file'));
+
+    $filtered_html_format = array(
+      'format' => 'filtered_html',
+      'name' => 'Filtered HTML',
+    );
+    $filtered_html_format = (object) $filtered_html_format;
+    filter_format_save($filtered_html_format);
+
+    $filtered_html_permission = filter_permission_name($filtered_html_format);
+    user_role_grant_permissions(DRUPAL_ANONYMOUS_RID, array($filtered_html_permission));
   }
 
   /**
@@ -372,8 +382,6 @@ class FormsTestCase extends DrupalWebTestCase {
  * Tests building and processing of core form elements.
  */
 class FormElementTestCase extends DrupalWebTestCase {
-  protected $profile = 'testing';
-
   public static function getInfo() {
     return array(
       'name' => 'Element processing',
@@ -465,7 +473,7 @@ class FormAlterTestCase extends DrupalWebTestCase {
   }
 
   function setUp() {
-    parent::setUp('form_test');
+    parent::setUp(array('block', 'form_test'));
   }
 
   /**
@@ -1181,6 +1189,8 @@ class FormsRebuildTestCase extends DrupalWebTestCase {
   function setUp() {
     parent::setUp('form_test');
 
+    $this->drupalCreateContentType(array('type' => 'page', 'name' => 'Basic page'));
+
     $this->web_user = $this->drupalCreateUser(array('access content'));
     $this->drupalLogin($this->web_user);
   }
diff --git a/core/modules/simpletest/tests/menu.test b/core/modules/simpletest/tests/menu.test
index d0612ac..9bc9d28 100644
--- a/core/modules/simpletest/tests/menu.test
+++ b/core/modules/simpletest/tests/menu.test
@@ -647,9 +647,6 @@ class MenuRouterTestCase extends DrupalWebTestCase {
  * Tests for menu links.
  */
 class MenuLinksUnitTestCase extends DrupalWebTestCase {
-  // Use the lightweight testing profile for this test.
-  protected $profile = 'testing';
-
   public static function getInfo() {
     return array(
       'name' => 'Menu links',
@@ -1017,6 +1014,8 @@ class MenuTreeOutputTestCase extends DrupalWebTestCase {
  * Menu breadcrumbs related tests.
  */
 class MenuBreadcrumbTestCase extends MenuWebTestCase {
+  protected $profile = 'standard';
+
   public static function getInfo() {
     return array(
       'name' => 'Breadcrumbs',
@@ -1026,12 +1025,8 @@ class MenuBreadcrumbTestCase extends MenuWebTestCase {
   }
 
   function setUp() {
-    $modules = func_get_args();
-    if (isset($modules[0]) && is_array($modules[0])) {
-      $modules = $modules[0];
-    }
-    $modules[] = 'menu_test';
-    parent::setUp($modules);
+    parent::setUp(array('menu_test'));
+
     $perms = array_keys(module_invoke_all('permission'));
     $this->admin_user = $this->drupalCreateUser($perms);
     $this->drupalLogin($this->admin_user);
@@ -1520,12 +1515,7 @@ class MenuTrailTestCase extends MenuWebTestCase {
   }
 
   function setUp() {
-    $modules = func_get_args();
-    if (isset($modules[0]) && is_array($modules[0])) {
-      $modules = $modules[0];
-    }
-    $modules[] = 'menu_test';
-    parent::setUp($modules);
+    parent::setUp(array('block', 'menu_test'));
     $this->admin_user = $this->drupalCreateUser(array('administer site configuration', 'access administration pages'));
     $this->drupalLogin($this->admin_user);
 
diff --git a/core/modules/simpletest/tests/password.test b/core/modules/simpletest/tests/password.test
index e0139e9..2797786 100644
--- a/core/modules/simpletest/tests/password.test
+++ b/core/modules/simpletest/tests/password.test
@@ -9,8 +9,6 @@
  * Unit tests for password hashing API.
  */
 class PasswordHashingTest extends DrupalWebTestCase {
-  protected $profile = 'testing';
-
   public static function getInfo() {
     return array(
       'name' => 'Password hashing',
diff --git a/core/modules/simpletest/tests/theme.test b/core/modules/simpletest/tests/theme.test
index 6fb6b3b..7649e3d 100644
--- a/core/modules/simpletest/tests/theme.test
+++ b/core/modules/simpletest/tests/theme.test
@@ -9,8 +9,6 @@
  * Unit tests for the Theme API.
  */
 class ThemeUnitTest extends DrupalWebTestCase {
-  protected $profile = 'testing';
-
   public static function getInfo() {
     return array(
       'name' => 'Theme API',
@@ -178,8 +176,6 @@ class ThemeTableUnitTest extends DrupalWebTestCase {
  * Tests for common theme functions.
  */
 class ThemeFunctionsTestCase extends DrupalWebTestCase {
-  protected $profile = 'testing';
-
   public static function getInfo() {
     return array(
       'name' => 'Theme functions',
diff --git a/core/modules/statistics/statistics.test b/core/modules/statistics/statistics.test
index 592f165..a2aaf64 100644
--- a/core/modules/statistics/statistics.test
+++ b/core/modules/statistics/statistics.test
@@ -11,7 +11,12 @@
 class StatisticsTestCase extends DrupalWebTestCase {
 
   function setUp() {
-    parent::setUp('statistics');
+    parent::setUp(array('node', 'block', 'statistics'));
+
+    // Create Basic page node type.
+    if ($this->profile != 'standard') {
+      $this->drupalCreateContentType(array('type' => 'page', 'name' => 'Basic page'));
+    }
 
     // Create user.
     $this->blocking_user = $this->drupalCreateUser(array(
@@ -61,7 +66,12 @@ class StatisticsLoggingTestCase extends DrupalWebTestCase {
   }
 
   function setUp() {
-    parent::setUp('statistics');
+    parent::setUp(array('statistics', 'block'));
+
+    // Create Basic page node type.
+    if ($this->profile != 'standard') {
+      $this->drupalCreateContentType(array('type' => 'page', 'name' => 'Basic page'));
+    }
 
     $this->auth_user = $this->drupalCreateUser(array('access content', 'create page content', 'edit own page content'));
 
@@ -297,7 +307,12 @@ class StatisticsAdminTestCase extends DrupalWebTestCase {
   }
 
   function setUp() {
-    parent::setUp('statistics');
+    parent::setUp(array('node', 'statistics'));
+
+    // Create Basic page node type.
+    if ($this->profile != 'standard') {
+      $this->drupalCreateContentType(array('type' => 'page', 'name' => 'Basic page'));
+    }
     $this->privileged_user = $this->drupalCreateUser(array('access statistics', 'administer statistics', 'view post access counter', 'create page content'));
     $this->drupalLogin($this->privileged_user);
     $this->test_node = $this->drupalCreateNode(array('type' => 'page', 'uid' => $this->privileged_user->uid));
@@ -380,7 +395,11 @@ class StatisticsAdminTestCase extends DrupalWebTestCase {
     $timestamp = time();
     $this->drupalPost(NULL, NULL, t('Cancel account'));
     // Confirm account cancellation request.
-    $this->drupalGet("user/$account->uid/cancel/confirm/$timestamp/" . user_pass_rehash($account->pass, $timestamp, $account->login));
+    $mails = $this->drupalGetMails();
+    $mail = end($mails);
+    preg_match('@http.+?(user/\d+/cancel/confirm/\d+/[^\s]+)@', $mail['body'], $matches);
+    $path = $matches[1];
+    $this->drupalGet($path);
     $this->assertFalse(user_load($account->uid, TRUE), t('User is not found in the database.'));
 
     $this->drupalGet('admin/reports/visitors');
diff --git a/core/modules/system/system.admin.inc b/core/modules/system/system.admin.inc
index 6dca80b..117bf5e 100644
--- a/core/modules/system/system.admin.inc
+++ b/core/modules/system/system.admin.inc
@@ -1487,7 +1487,7 @@ function system_site_information_settings() {
   $form['front_page']['site_frontpage'] = array(
     '#type' => 'textfield',
     '#title' => t('Default front page'),
-    '#default_value' => (variable_get('site_frontpage')!='node'?drupal_get_path_alias(variable_get('site_frontpage', 'node')):''),
+    '#default_value' => (variable_get('site_frontpage')!='user'?drupal_get_path_alias(variable_get('site_frontpage', 'user')):''),
     '#size' => 40,
     '#description' => t('Optionally, specify a relative URL to display as the front page.  Leave blank to display the default content feed.'),
     '#field_prefix' => url(NULL, array('absolute' => TRUE)) . (variable_get('clean_url', 0) ? '' : '?q='),
@@ -1536,7 +1536,7 @@ function system_site_information_settings_validate($form, &$form_state) {
   // Check for empty front page path.
   if (empty($form_state['values']['site_frontpage'])) {
     // Set to default "node".
-    form_set_value($form['front_page']['site_frontpage'], 'node', $form_state);
+    form_set_value($form['front_page']['site_frontpage'], 'user', $form_state);
   }
   else {
     // Get the normal path of the front page.
diff --git a/core/modules/system/system.module b/core/modules/system/system.module
index 625be0a..8c62302 100644
--- a/core/modules/system/system.module
+++ b/core/modules/system/system.module
@@ -2036,8 +2036,12 @@ function system_user_timezone(&$form, &$form_state) {
 function system_block_info() {
   $blocks['main'] = array(
     'info' => t('Main page content'),
-     // Cached elsewhere.
+    // Cached elsewhere.
     'cache' => DRUPAL_NO_CACHE,
+    // Automatically try to assign the main content to the "content" region, in
+    // case such a region exists.
+    'region' => 'content',
+    'status' => 1,
   );
   $blocks['powered-by'] = array(
     'info' => t('Powered by Drupal'),
@@ -2361,7 +2365,6 @@ function _system_rebuild_module_data() {
   $modules[$profile] = new stdClass();
   $modules[$profile]->name = $profile;
   $modules[$profile]->uri = 'profiles/' . $profile . '/' . $profile . '.profile';
-  $modules[$profile]->filename = $profile . '.profile';
 
   // Install profile hooks are always executed last.
   $modules[$profile]->weight = 1000;
diff --git a/core/modules/system/system.test b/core/modules/system/system.test
index 4e3761d..97218a1 100644
--- a/core/modules/system/system.test
+++ b/core/modules/system/system.test
@@ -130,8 +130,6 @@ class ModuleTestCase extends DrupalWebTestCase {
  * Test module enabling/disabling functionality.
  */
 class EnableDisableTestCase extends ModuleTestCase {
-  protected $profile = 'testing';
-
   public static function getInfo() {
     return array(
       'name' => 'Enable/disable modules',
@@ -885,10 +883,13 @@ class AccessDeniedTestCase extends DrupalWebTestCase {
   }
 
   function setUp() {
-    parent::setUp();
+    parent::setUp(array('block'));
 
     // Create an administrative user.
     $this->admin_user = $this->drupalCreateUser(array('access administration pages', 'administer site configuration', 'administer blocks'));
+
+    user_role_grant_permissions(DRUPAL_ANONYMOUS_RID, array('access user profiles'));
+    user_role_grant_permissions(DRUPAL_AUTHENTICATED_RID, array('access user profiles'));
   }
 
   function testAccessDenied() {
@@ -896,34 +897,34 @@ class AccessDeniedTestCase extends DrupalWebTestCase {
     $this->assertText(t('Access denied'), t('Found the default 403 page'));
     $this->assertResponse(403);
 
+    // Use a custom 403 page.
     $this->drupalLogin($this->admin_user);
     $edit = array(
-      'title' => $this->randomName(10),
-      'body' => array(LANGUAGE_NONE => array(array('value' => $this->randomName(100)))),
+      'site_403' => 'user/' . $this->admin_user->uid,
     );
-    $node = $this->drupalCreateNode($edit);
-
-    // Use a custom 403 page.
-    $this->drupalPost('admin/config/system/site-information', array('site_403' => 'node/' . $node->nid), t('Save configuration'));
+    $this->drupalPost('admin/config/system/site-information', $edit, t('Save configuration'));
 
-    $this->drupalLogout();
-    $this->drupalGet('admin');
-    $this->assertText($node->title, t('Found the custom 403 page'));
+    // Enable the user login block.
+    $edit = array(
+      'blocks[user_login][region]' => 'sidebar_first',
+    );
+    $this->drupalPost('admin/structure/block', $edit, t('Save blocks'));
 
     // Logout and check that the user login block is shown on custom 403 pages.
     $this->drupalLogout();
-
     $this->drupalGet('admin');
-    $this->assertText($node->title, t('Found the custom 403 page'));
+    $this->assertText($this->admin_user->name, t('Found the custom 403 page'));
     $this->assertText(t('User login'), t('Blocks are shown on the custom 403 page'));
 
     // Log back in and remove the custom 403 page.
     $this->drupalLogin($this->admin_user);
-    $this->drupalPost('admin/config/system/site-information', array('site_403' => ''), t('Save configuration'));
+    $edit = array(
+      'site_403' => '',
+    );
+    $this->drupalPost('admin/config/system/site-information', $edit, t('Save configuration'));
 
     // Logout and check that the user login block is shown on default 403 pages.
     $this->drupalLogout();
-
     $this->drupalGet('admin');
     $this->assertText(t('Access denied'), t('Found the default 403 page'));
     $this->assertResponse(403);
@@ -950,9 +951,6 @@ class AccessDeniedTestCase extends DrupalWebTestCase {
 class PageNotFoundTestCase extends DrupalWebTestCase {
   protected $admin_user;
 
-  /**
-   * Implement getInfo().
-   */
   public static function getInfo() {
     return array(
       'name' => '404 functionality',
@@ -961,32 +959,29 @@ class PageNotFoundTestCase extends DrupalWebTestCase {
     );
   }
 
-  /**
-   * Implement setUp().
-   */
   function setUp() {
     parent::setUp();
 
     // Create an administrative user.
     $this->admin_user = $this->drupalCreateUser(array('administer site configuration'));
-    $this->drupalLogin($this->admin_user);
+
+    user_role_grant_permissions(DRUPAL_ANONYMOUS_RID, array('access user profiles'));
+    user_role_grant_permissions(DRUPAL_AUTHENTICATED_RID, array('access user profiles'));
   }
 
   function testPageNotFound() {
+    $this->drupalLogin($this->admin_user);
     $this->drupalGet($this->randomName(10));
     $this->assertText(t('Page not found'), t('Found the default 404 page'));
 
+    // Use a custom 404 page.
     $edit = array(
-      'title' => $this->randomName(10),
-      'body' => array(LANGUAGE_NONE => array(array('value' => $this->randomName(100)))),
+      'site_404' => 'user/' . $this->admin_user->uid,
     );
-    $node = $this->drupalCreateNode($edit);
-
-    // Use a custom 404 page.
-    $this->drupalPost('admin/config/system/site-information', array('site_404' => 'node/' . $node->nid), t('Save configuration'));
+    $this->drupalPost('admin/config/system/site-information', $edit, t('Save configuration'));
 
     $this->drupalGet($this->randomName(10));
-    $this->assertText($node->title, t('Found the custom 404 page'));
+    $this->assertText($this->admin_user->name, t('Found the custom 404 page'));
   }
 }
 
@@ -1306,7 +1301,9 @@ class PageTitleFiltering extends DrupalWebTestCase {
    * Implement setUp().
    */
   function setUp() {
-    parent::setUp();
+    parent::setUp(array('node'));
+
+    $this->drupalCreateContentType(array('type' => 'page', 'name' => 'Basic page'));
 
     $this->content_user = $this->drupalCreateUser(array('create page content', 'access content', 'administer themes', 'administer site configuration'));
     $this->drupalLogin($this->content_user);
@@ -1447,8 +1444,6 @@ class FrontPageTestCase extends DrupalWebTestCase {
 }
 
 class SystemBlockTestCase extends DrupalWebTestCase {
-  protected $profile = 'testing';
-
   public static function getInfo() {
     return array(
       'name' => 'Block functionality',
@@ -1609,7 +1604,9 @@ class SystemThemeFunctionalTest extends DrupalWebTestCase {
   }
 
   function setUp() {
-    parent::setUp();
+    parent::setUp(array('block'));
+
+    $this->drupalCreateContentType(array('type' => 'page', 'name' => 'Basic page'));
 
     $this->admin_user = $this->drupalCreateUser(array('access administration pages', 'view the administration theme', 'administer themes', 'bypass node access', 'administer blocks'));
     $this->drupalLogin($this->admin_user);
@@ -1622,7 +1619,7 @@ class SystemThemeFunctionalTest extends DrupalWebTestCase {
   function testThemeSettings() {
     // Specify a filesystem path to be used for the logo.
     $file = current($this->drupalGetTestFiles('image'));
-    $fullpath = drupal_realpath($file->uri);
+    $fullpath = strtr($file->uri, array('public:/' => variable_get('file_public_path', conf_path() . '/files')));
     $edit = array(
       'default_logo' => FALSE,
       'logo_path' => $fullpath,
@@ -1700,20 +1697,20 @@ class SystemThemeFunctionalTest extends DrupalWebTestCase {
    * Test switching the default theme.
    */
   function testSwitchDefaultTheme() {
-    // Enable "stark" and set it as the default theme.
-    theme_enable(array('stark'));
+    // Enable Bartik and set it as the default theme.
+    theme_enable(array('bartik'));
     $this->drupalGet('admin/appearance');
-    $this->clickLink(t('Set default'), 1);
-    $this->assertTrue(variable_get('theme_default', '') == 'stark', t('Site default theme switched successfully.'));
+    $this->clickLink(t('Set default'));
+    $this->assertEqual(variable_get('theme_default', ''), 'bartik');
 
     // Test the default theme on the secondary links (blocks admin page).
     $this->drupalGet('admin/structure/block');
-    $this->assertText('Stark(' . t('active tab') . ')', t('Default local task on blocks admin page is the default theme.'));
-    // Switch back to Bartik and test again to test that the menu cache is cleared.
+    $this->assertText('Bartik(' . t('active tab') . ')', t('Default local task on blocks admin page is the default theme.'));
+    // Switch back to Stark and test again to test that the menu cache is cleared.
     $this->drupalGet('admin/appearance');
     $this->clickLink(t('Set default'), 0);
     $this->drupalGet('admin/structure/block');
-    $this->assertText('Bartik(' . t('active tab') . ')', t('Default local task on blocks admin page has changed.'));
+    $this->assertText('Stark(' . t('active tab') . ')', t('Default local task on blocks admin page has changed.'));
   }
 }
 
diff --git a/core/modules/taxonomy/taxonomy.test b/core/modules/taxonomy/taxonomy.test
index 3e6301a..86a364b 100644
--- a/core/modules/taxonomy/taxonomy.test
+++ b/core/modules/taxonomy/taxonomy.test
@@ -9,6 +9,19 @@
 * Class with common helper methods.
 */
 class TaxonomyWebTestCase extends DrupalWebTestCase {
+  function setUp() {
+    $modules = func_get_args();
+    if (isset($modules[0]) && is_array($modules[0])) {
+      $modules = $modules[0];
+    }
+    $modules[] = 'taxonomy';
+    parent::setUp($modules);
+
+    // Create Basic page and Article node types.
+    if ($this->profile != 'standard') {
+      $this->drupalCreateContentType(array('type' => 'article', 'name' => 'Article'));
+    }
+  }
 
   /**
    * Returns a new vocabulary with random properties.
@@ -191,7 +204,7 @@ class TaxonomyVocabularyUnitTest extends TaxonomyWebTestCase {
   }
 
   function setUp() {
-    parent::setUp('taxonomy', 'field_test');
+    parent::setUp(array('field_test'));
     $admin_user = $this->drupalCreateUser(array('create article content', 'administer taxonomy'));
     $this->drupalLogin($admin_user);
     $this->vocabulary = $this->createVocabulary();
@@ -416,6 +429,7 @@ class TaxonomyTermUnitTest extends TaxonomyWebTestCase {
  * Test for legacy node bug.
  */
 class TaxonomyLegacyTestCase extends TaxonomyWebTestCase {
+  protected $profile = 'standard';
 
   public static function getInfo() {
     return array(
@@ -426,7 +440,7 @@ class TaxonomyLegacyTestCase extends TaxonomyWebTestCase {
   }
 
   function setUp() {
-    parent::setUp('taxonomy');
+    parent::setUp();
     $this->admin_user = $this->drupalCreateUser(array('administer taxonomy', 'administer nodes', 'bypass node access'));
     $this->drupalLogin($this->admin_user);
   }
@@ -463,7 +477,7 @@ class TaxonomyTermTestCase extends TaxonomyWebTestCase {
   }
 
   function setUp() {
-    parent::setUp('taxonomy');
+    parent::setUp();
     $this->admin_user = $this->drupalCreateUser(array('administer taxonomy', 'bypass node access'));
     $this->drupalLogin($this->admin_user);
     $this->vocabulary = $this->createVocabulary();
@@ -842,7 +856,7 @@ class TaxonomyTermIndexTestCase extends TaxonomyWebTestCase {
   }
 
   function setUp() {
-    parent::setUp('taxonomy');
+    parent::setUp();
 
     // Create an administrative user.
     $this->admin_user = $this->drupalCreateUser(array('administer taxonomy', 'bypass node access'));
@@ -1110,7 +1124,7 @@ class TaxonomyHooksTestCase extends TaxonomyWebTestCase {
   }
 
   function setUp() {
-    parent::setUp('taxonomy', 'taxonomy_test');
+    parent::setUp(array('taxonomy_test'));
     $taxonomy_admin = $this->drupalCreateUser(array('administer taxonomy'));
     $this->drupalLogin($taxonomy_admin);
   }
diff --git a/core/modules/tracker/tracker.test b/core/modules/tracker/tracker.test
index 3cc227e..4e5c39e 100644
--- a/core/modules/tracker/tracker.test
+++ b/core/modules/tracker/tracker.test
@@ -21,6 +21,8 @@ class TrackerTest extends DrupalWebTestCase {
   function setUp() {
     parent::setUp('comment', 'tracker');
 
+    $this->drupalCreateContentType(array('type' => 'page', 'name' => 'Basic page'));
+
     $permissions = array('access comments', 'create page content', 'post comments', 'skip comment approval');
     $this->user = $this->drupalCreateUser($permissions);
     $this->other_user = $this->drupalCreateUser($permissions);
@@ -94,7 +96,7 @@ class TrackerTest extends DrupalWebTestCase {
     $this->assertText($other_published_my_comment->title, t("Nodes that the user has commented on appear in the user's tracker listing."));
 
     // Verify that unpublished comments are removed from the tracker.
-    $admin_user = $this->drupalCreateUser(array('administer comments', 'access user profiles'));
+    $admin_user = $this->drupalCreateUser(array('post comments', 'administer comments', 'access user profiles'));
     $this->drupalLogin($admin_user);
     $this->drupalPost('comment/1/edit', array('status' => COMMENT_NOT_PUBLISHED), t('Save'));
     $this->drupalGet('user/' . $this->user->uid . '/track');
diff --git a/core/modules/translation/translation.test b/core/modules/translation/translation.test
index 0e801c1..c27da0f 100644
--- a/core/modules/translation/translation.test
+++ b/core/modules/translation/translation.test
@@ -6,6 +6,8 @@
  */
 
 class TranslationTestCase extends DrupalWebTestCase {
+  protected $profile = 'standard';
+
   protected $book;
 
   public static function getInfo() {
diff --git a/core/modules/trigger/trigger.test b/core/modules/trigger/trigger.test
index 9a9a4ba..daede4b 100644
--- a/core/modules/trigger/trigger.test
+++ b/core/modules/trigger/trigger.test
@@ -9,6 +9,21 @@
  * Provides common helper methods.
  */
 class TriggerWebTestCase extends DrupalWebTestCase {
+  function setUp() {
+    $modules = func_get_args();
+    if (isset($modules[0]) && is_array($modules[0])) {
+      $modules = $modules[0];
+    }
+    $modules[] = 'trigger';
+    $modules[] = 'node';
+    parent::setUp($modules);
+
+    // Create Basic page and Article node types.
+    if ($this->profile != 'standard') {
+      $this->drupalCreateContentType(array('type' => 'page', 'name' => 'Basic page'));
+      $this->drupalCreateContentType(array('type' => 'article', 'name' => 'Article'));
+    }
+  }
 
   /**
    * Configure an advanced action.
@@ -50,7 +65,7 @@ class TriggerContentTestCase extends TriggerWebTestCase {
   }
 
   function setUp() {
-    parent::setUp('trigger', 'trigger_test');
+    parent::setUp(array('trigger_test'));
   }
 
   /**
@@ -196,7 +211,7 @@ class TriggerCronTestCase extends TriggerWebTestCase {
   }
 
   function setUp() {
-    parent::setUp('trigger', 'trigger_test');
+    parent::setUp(array('trigger_test'));
   }
 
   /**
@@ -255,10 +270,6 @@ class TriggerCronTestCase extends TriggerWebTestCase {
  */
 class TriggerActionTestCase extends TriggerWebTestCase {
 
-  function setUp() {
-    parent::setUp('trigger');
-  }
-
   /**
    * Creates a message with tokens.
    *
@@ -495,11 +506,15 @@ class TriggerUserActionTestCase extends TriggerActionTestCase {
     );
   }
 
+  function setUp() {
+    parent::setUp(array('comment'));
+  }
+
   /**
    * Tests user action assignment and execution.
    */
   function testUserActionAssignmentExecution() {
-    $test_user = $this->drupalCreateUser(array('administer actions', 'create article content', 'access comments', 'administer comments', 'skip comment approval', 'edit own comments'));
+    $test_user = $this->drupalCreateUser(array('administer actions', 'create article content', 'access comments', 'administer comments', 'post comments', 'skip comment approval', 'edit own comments'));
     $this->drupalLogin($test_user);
 
     $triggers = array('comment_presave', 'comment_insert', 'comment_update');
@@ -519,9 +534,9 @@ class TriggerUserActionTestCase extends TriggerActionTestCase {
     $comment_author_uid = $account->uid;
     // Now rehabilitate the comment author so it can be be blocked again when
     // the comment is updated.
-    user_save($account, array('status' => TRUE));
+    user_save($account, array('status' => 1));
 
-    $test_user = $this->drupalCreateUser(array('administer actions', 'create article content', 'access comments', 'administer comments', 'skip comment approval', 'edit own comments'));
+    $test_user = $this->drupalCreateUser(array('administer actions', 'create article content', 'access comments', 'administer comments', 'post comments', 'skip comment approval', 'edit own comments'));
     $this->drupalLogin($test_user);
 
     // Our original comment will have been comment 1.
@@ -530,7 +545,7 @@ class TriggerUserActionTestCase extends TriggerActionTestCase {
     $this->assertTrue($comment_author_account->status == 0, t('Comment author account (uid=@uid) is blocked after update to comment', array('@uid' => $comment_author_uid)));
 
     // Verify that the comment was updated.
-    $test_user = $this->drupalCreateUser(array('administer actions', 'create article content', 'access comments', 'administer comments', 'skip comment approval', 'edit own comments'));
+    $test_user = $this->drupalCreateUser(array('administer actions', 'create article content', 'access comments', 'administer comments', 'post comments', 'skip comment approval', 'edit own comments'));
     $this->drupalLogin($test_user);
 
     $this->drupalGet("node/$node->nid");
@@ -555,7 +570,7 @@ class TriggerOtherTestCase extends TriggerWebTestCase {
   }
 
   function setUp() {
-    parent::setUp('trigger', 'trigger_test', 'contact');
+    parent::setUp(array('trigger_test', 'contact', 'comment', 'taxonomy'));
   }
 
   /**
@@ -685,7 +700,7 @@ class TriggerOtherTestCase extends TriggerWebTestCase {
 /**
  * Tests that orphaned actions are properly handled.
  */
-class TriggerOrphanedActionsTestCase extends DrupalWebTestCase {
+class TriggerOrphanedActionsTestCase extends TriggerWebTestCase {
 
   public static function getInfo() {
     return array(
@@ -696,7 +711,7 @@ class TriggerOrphanedActionsTestCase extends DrupalWebTestCase {
   }
 
   function setUp() {
-    parent::setUp('trigger', 'trigger_test');
+    parent::setUp(array('trigger_test'));
   }
 
   /**
diff --git a/core/modules/user/user.test b/core/modules/user/user.test
index 39d90d1..9267a9a 100644
--- a/core/modules/user/user.test
+++ b/core/modules/user/user.test
@@ -455,6 +455,8 @@ class UserLoginTestCase extends DrupalWebTestCase {
  * Test cancelling a user.
  */
 class UserCancelTestCase extends DrupalWebTestCase {
+  protected $profile = 'standard';
+
   public static function getInfo() {
     return array(
       'name' => 'Cancel account',
