diff --git tests/views_pager.test tests/views_pager.test
new file mode 100644
index 0000000..ffa7343
--- /dev/null
+++ tests/views_pager.test
@@ -0,0 +1,243 @@
+<?php
+// $Id$
+/**
+ * @file
+ *   Tests the pluggable pager system
+ */
+
+class ViewsPagerTest extends DrupalWebTestCase {
+  public static function getInfo() {
+    return array(
+      'name' => 'Pluggable pagers',
+      'description' => 'Test the pluggable pager system',
+      'group' => 'Views',
+    );
+  }
+
+  public function setUp() {
+    parent::setUp('views', 'views_ui', 'views_test');
+  }
+
+  /**
+   * Pagers was sometimes not stored.
+   *
+   * See: http://drupal.org/node/652712.
+   */
+  public function testStorePagerSettings() {
+    $admin_user = $this->drupalCreateUser(array('administer views', 'administer site configuration'));
+    $this->drupalLogin($admin_user);
+    // Test behaviour described in http://drupal.org/node/652712#comment-2354918.
+
+    $this->drupalGet('admin/build/views/edit/frontpage');
+
+
+    $edit = array(
+      'pager_options[items_per_page]' => 20,
+    );
+    $this->drupalPost('admin/build/views/nojs/display/frontpage/default/pager_options', $edit, t('Update'));
+    $this->assertText('20 items');
+
+    // Change type and check whether the type is new type is stored.
+    $edit = array();
+    $edit = array(
+      'pager[type]' => 'mini',
+    );
+    $this->drupalPost('admin/build/views/nojs/display/frontpage/default/pager', $edit, t('Update'));
+    $this->drupalGet('admin/build/views/edit/frontpage');
+    $this->assertText('Mini pager', 'Changed pager plugin, should change some text');
+
+    // Test behaviour described in http://drupal.org/node/652712#comment-2354400
+    $view = $this->viewsStorePagerSettings();
+    // Make it editable in the admin interface.
+    $view->save();
+
+    $this->drupalGet('admin/build/views/test_store_pager_settings');
+
+    $edit = array();
+    $edit = array(
+      'pager[type]' => 'full',
+    );
+    $this->drupalPost('admin/build/views/nojs/display/test_store_pager_settings/default/pager', $edit, t('Update'));
+    $this->assert('Paged');
+
+    $edit = array(
+      'pager_options[items_per_page]' => 20,
+    );
+    $this->drupalPost('admin/build/views/nojs/display/test_store_pager_settings/default/pager_options', $edit, t('Update'));
+    $this->assertText('20 items');
+
+    // add new display and test the settings again, by override it.
+    $edit = array(
+      'display' => 'page',
+    );
+    // Add a display and override the pager settings.
+    $this->drupalPost('admin/build/views/edit/test_store_pager_settings', $edit, t('Add display'));
+    $this->drupalPost('admin/build/views/nojs/display/test_store_pager_settings/page_1/pager', array(), t('Override'));
+
+    $edit = array(
+      'pager[type]' => 'mini',
+    );
+    $this->drupalPost('admin/build/views/nojs/display/test_store_pager_settings/page_1/pager', $edit, t('Update'));
+    $this->drupalGet('admin/build/views/edit/test_store_pager_settings');
+    $this->assertText('Mini pager', 'Changed pager plugin, should change some text');
+
+    $edit = array(
+      'pager_options[items_per_page]' => 10,
+    );
+    $this->drupalPost('admin/build/views/nojs/display/test_store_pager_settings/default/pager_options', $edit, t('Update'));
+    $this->assertText('20 items');
+
+  }
+
+  public function viewsStorePagerSettings() {
+    $view = new view;
+    $view->name = 'test_store_pager_settings';
+    $view->description = '';
+    $view->tag = '';
+    $view->view_php = '';
+    $view->base_table = 'node';
+    $view->is_cacheable = FALSE;
+    $view->api_version = 2;
+    $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
+
+    /* Display: Defaults */
+    $handler = $view->new_display('default', 'Defaults', 'default');
+    $handler->display->display_options['access']['type'] = 'none';
+    $handler->display->display_options['cache']['type'] = 'none';
+    $handler->display->display_options['exposed_form']['type'] = 'basic';
+    $handler->display->display_options['pager']['type'] = 'none';
+    $handler->display->display_options['style_plugin'] = 'default';
+    $handler->display->display_options['row_plugin'] = 'node';
+    return $view;
+  }
+
+  /**
+   * Test the none-pager-query.
+   */
+  public function testNoLimit() {
+    // Create 11 nodes and take sure that everyone is returned.
+    // We create 11 nodes, because the default pager plugin had 10 items per page.
+    for ($i = 0; $i < 11; $i++) {
+      $this->drupalCreateNode();
+    }
+    $view = $this->viewsPagerNoLimit();
+    $view->set_display('default');
+    $view->execute();
+    $this->assertEqual(count($view->result), 11, t('Take sure that every item is returned in the result'));
+
+    $view->destroy();
+
+    // Setup and test a offset.
+    $view = $this->viewsPagerNoLimit();
+    $view->set_display('default');
+
+    $pager = array(
+      'type' => 'none',
+      'options' => array(
+        'offset' => 3,
+      ),
+    );
+    $view->display_handler->set_option('pager', $pager);
+    $view->execute();
+
+    $this->assertEqual(count($view->result), 8, t('Take sure that every item beside the first three is returned in the result'));
+
+    // Check some public functions.
+    $this->assertFalse($view->query->pager->use_pager());
+    $this->assertFalse($view->query->pager->use_count_query());
+    $this->assertEqual($view->query->pager->get_items_per_page(), 0);
+  }
+
+  public function viewsPagerNoLimit() {
+    $view = new view;
+    $view->name = 'test_pager_none';
+    $view->description = '';
+    $view->tag = '';
+    $view->view_php = '';
+    $view->base_table = 'node';
+    $view->is_cacheable = FALSE;
+    $view->api_version = 2;
+    $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
+
+    /* Display: Defaults */
+    $handler = $view->new_display('default', 'Defaults', 'default');
+    $handler->display->display_options['access']['type'] = 'none';
+    $handler->display->display_options['cache']['type'] = 'none';
+    $handler->display->display_options['exposed_form']['type'] = 'basic';
+    $handler->display->display_options['pager']['type'] = 'none';
+    $handler->display->display_options['style_plugin'] = 'default';
+    $handler->display->display_options['row_plugin'] = 'node';
+    return $view;
+  }
+
+  /**
+   * Test the some pager plugin.
+   */
+  public function testLimit() {
+    // Create 11 nodes and take sure that everyone is returned.
+    // We create 11 nodes, because the default pager plugin had 10 items per page.
+    for ($i = 0; $i < 11; $i++) {
+      $this->drupalCreateNode();
+    }
+    $view = $this->viewsPagerLimit();
+    $view->set_display('default');
+    $view->execute();
+    $this->assertEqual(count($view->result), 5, t('Take sure that only a certain count of items is returned'));
+    $view->destroy();
+
+    // Setup and test a offset.
+    $view = $this->viewsPagerLimit();
+    $view->set_display('default');
+
+    $pager = array(
+      'type' => 'none',
+      'options' => array(
+        'offset' => 8,
+        'items_per_page' => 5,
+      ),
+    );
+    $view->display_handler->set_option('pager', $pager);
+    $view->execute();
+    $this->assertEqual(count($view->result), 3, t('Take sure that only a certain count of items is returned'));
+
+    // Check some public functions.
+    $this->assertFalse($view->query->pager->use_pager());
+    $this->assertFalse($view->query->pager->use_count_query());
+  }
+
+  public function viewsPagerLimit() {
+    $view = new view;
+    $view->name = 'test_pager_some';
+    $view->description = '';
+    $view->tag = '';
+    $view->view_php = '';
+    $view->base_table = 'node';
+    $view->is_cacheable = FALSE;
+    $view->api_version = 2;
+    $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
+
+    /* Display: Defaults */
+    $handler = $view->new_display('default', 'Defaults', 'default');
+    $handler->display->display_options['access']['type'] = 'none';
+    $handler->display->display_options['cache']['type'] = 'none';
+    $handler->display->display_options['exposed_form']['type'] = 'basic';
+    $handler->display->display_options['pager']['type'] = 'some';
+    $handler->display->display_options['pager']['options']['offset'] = 0;
+    $handler->display->display_options['pager']['options']['items_per_page'] = 5;
+    $handler->display->display_options['style_plugin'] = 'default';
+    $handler->display->display_options['row_plugin'] = 'node';
+    return $view;
+  }
+
+  /**
+   * Test the normal pager.
+   */
+  public function testNormalPager() {
+  }
+
+  /**
+   * Test the minipager.
+   */
+  public function testMiniPager() {
+  }
+}
