├── .gitignore ├── CHANGELOG.md ├── CONTRIBUTING.md ├── LICENSE.txt ├── README.md ├── ROADMAP.md ├── build ├── config │ ├── branches.js │ ├── build_command.js │ ├── eslint.conf.js │ ├── karma.conf.js │ ├── paths.js │ └── tested_browsers.js ├── scripts │ ├── build.jakefile.js │ ├── integrate.jakefile.js │ ├── readme.md │ ├── release.jakefile.js │ └── run_jake.sh └── util │ ├── browserify_runner.js │ ├── git_runner.js │ ├── lint_runner.js │ ├── sh.js │ └── version_checker.js ├── dist └── quixote.js ├── docs ├── ElementRender.md ├── PositionDescriptor.md ├── QElement.md ├── QElementList.md ├── QFrame.md ├── QPage.md ├── QViewport.md ├── README.md ├── SizeDescriptor.md ├── Span.md ├── api.md ├── index.html └── quixote.md ├── example ├── .gitignore ├── LICENSE.txt ├── build │ ├── config │ │ ├── build_command.js │ │ ├── jshint.conf.js │ │ ├── karma.conf.js │ │ ├── paths.js │ │ └── tested_browsers.js │ ├── scripts │ │ ├── build.jakefile.js │ │ ├── run_jake.bat │ │ ├── run_jake.sh │ │ └── watch.js │ └── util │ │ ├── browserify_runner.js │ │ ├── karma_runner.js │ │ ├── mocha_runner.js │ │ ├── sh.js │ │ └── version_checker.js ├── jake.bat ├── jake.sh ├── package-lock.json ├── package.json ├── readme.md ├── src │ ├── _media_css_test.js │ ├── _toggle_test.js │ ├── assert.js │ ├── icon.svg │ ├── index.html │ ├── screen.css │ └── toggle.js ├── vendor │ ├── chai-2.1.0.js │ └── quixote.js ├── video_poster.jpg ├── watch.bat └── watch.sh ├── integrate.sh ├── jake.sh ├── package-lock.json ├── package.json ├── release.sh ├── spikes ├── ie8_iframe_quirks │ ├── README.md │ ├── index.html │ └── inner.html ├── ios_frame_scrolling │ ├── README.md │ ├── index.html │ └── inner.html ├── ios_frame_sizing │ ├── README.md │ ├── index.html │ └── inner.html └── ios_text_sizing │ ├── README.md │ ├── index.html │ └── inner.html ├── src ├── __reset.css ├── __reset.js ├── _assertable_test.js ├── _browser_test.js ├── _browsing_context_test.js ├── _q_element_list_test.js ├── _q_element_test.js ├── _q_frame_test.css ├── _q_frame_test.html ├── _q_frame_test.js ├── _q_frame_test2.css ├── _q_page_test.js ├── _q_viewport_test.js ├── _quixote_test.js ├── assertable.js ├── browser.js ├── browsing_context.js ├── descriptors │ ├── README.md │ ├── _absolute_position_test.js │ ├── _center_test.js │ ├── _descriptor_test.js │ ├── _element_edge_test.js │ ├── _element_render_edge_test.js │ ├── _element_render_test.js │ ├── _page_edge_test.js │ ├── _position_descriptor_test.js │ ├── _relative_position_test.js │ ├── _relative_size_test.js │ ├── _size_descriptor_test.js │ ├── _size_multiple_test.js │ ├── _span_test.js │ ├── _viewport_edge_test.js │ ├── absolute_position.js │ ├── center.js │ ├── descriptor.js │ ├── element_edge.js │ ├── element_render.js │ ├── element_render_edge.js │ ├── page_edge.js │ ├── position_descriptor.js │ ├── relative_position.js │ ├── relative_size.js │ ├── size_descriptor.js │ ├── size_multiple.js │ ├── span.js │ └── viewport_edge.js ├── q_element.js ├── q_element_list.js ├── q_frame.js ├── q_page.js ├── q_viewport.js ├── quixote.js ├── util │ ├── _ensure_test.js │ ├── _oop_test.js │ ├── assert.js │ ├── big_object_diff.js │ ├── ensure.js │ ├── oop.js │ └── shim.js └── values │ ├── README.md │ ├── _pixels_test.js │ ├── _position_test.js │ ├── _render_state_test.js │ ├── _size_test.js │ ├── _value_test.js │ ├── pixels.js │ ├── position.js │ ├── render_state.js │ ├── size.js │ └── value.js ├── test ├── README.md └── _assertion_test.js ├── vendor ├── async-1.4.2.js ├── camelcase-1.0.1-modified.js └── proclaim-2.0.0.js └── watch.js /.gitignore: -------------------------------------------------------------------------------- 1 | .idea/ 2 | node_modules/ 3 | generated/ -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | License (The MIT License) 2 | ------- 3 | Copyright (c) 2014-2015 Titanium I.T. LLC 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | 23 | 24 | 25 | Third Party Code: 26 | ----------------- 27 | 28 | * 'proclaim' licensed under MIT license (https://github.com/rowanmanning/proclaim) 29 | * 'camelcase' © Sindre Sorhus, licensed under MIT license (https://github.com/sindresorhus/camelcase) 30 | * 'async' Copyright 2010-2014 Caolan McMahon, licensed under MIT license (https://github.com/caolan/async) -------------------------------------------------------------------------------- /ROADMAP.md: -------------------------------------------------------------------------------- 1 | # Quixote Roadmap 2 | 3 | ## Release Ideas 4 | 5 | * **✅ v0.1** Basic DOM manipulation; raw position and style information 6 | * **✅ v0.2** "Cooked" absolute position info; initial assertion API 7 | * **✅ v0.3** Positioning relative to other elements 8 | * **✅ v0.4** Advanced positioning (middle, center, height, width, arithmetic, fractions) 9 | * **✅ v0.5** API hardening 10 | * **✅ v0.6** Responsive design 11 | * **✅ v0.7** Page and viewport assertions 12 | * **✅ v0.8 - v0.11** Dogfooding and real-world usage (more dogfooding releases to come) 13 | * **✅ v0.12** Element display status descriptors 14 | * **✅ v0.13** Element rendering boundaries 15 | * **✅ v0.14** QFrame quality of life improvements 16 | * **✅ v0.15** Support for third-party test runners 17 | * **✅ v1.0.0** New assertions 18 | * See our [work-in-progress roadmap](https://github.com/jamesshore/quixote/blob/master/ROADMAP.md) for the latest release plans. 19 | 20 | 21 | ## Current Feature: TBD 22 | 23 | 24 | ## To Do: TBD 25 | 26 | 27 | ## Dogfooding Notes 28 | 29 | * Provide a better way of integrating with standard assertion libraries? Use `valueOf()`? 30 | * Provide better error message when cross-origin 'src' provided to quixote.createFrame 31 | 32 | 33 | ## Future Features 34 | 35 | * Z-ordering 36 | * Colors? Contrast (fg color vs. bg color?)) 37 | * Plugin API 38 | -------------------------------------------------------------------------------- /build/config/branches.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014-2017 Titanium I.T. LLC. All rights reserved. For license, see "README" or "LICENSE" file. 2 | "use strict"; 3 | 4 | module.exports = { 5 | dev: "dev", 6 | integration: "master", 7 | release: "release" 8 | }; -------------------------------------------------------------------------------- /build/config/build_command.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 Titanium I.T. LLC. All rights reserved. For license, see "README" or "LICENSE" file. 2 | "use strict"; 3 | 4 | module.exports = "./jake.sh"; -------------------------------------------------------------------------------- /build/config/eslint.conf.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2017 Titanium I.T. LLC. All rights reserved. For license, see "README" or "LICENSE" file. 2 | "use strict"; 3 | 4 | let ERROR = "error"; 5 | 6 | exports.options = { 7 | "parserOptions": { 8 | "ecmaVersion": 2017 9 | }, 10 | 11 | "env": { 12 | "browser": true, 13 | "node": true, 14 | "commonjs": true, 15 | "mocha": true 16 | }, 17 | 18 | "globals": { 19 | "Promise": false, 20 | 21 | // Jake 22 | jake: false, 23 | desc: false, 24 | task: false, 25 | complete: false, 26 | fail: false, 27 | rule: false, 28 | directory: false, 29 | file: false 30 | }, 31 | 32 | "rules": { 33 | // "Possible Errors" (according to ESLint docs) 34 | "no-compare-neg-zero": ERROR, 35 | "no-cond-assign": ERROR, 36 | "no-constant-condition": ERROR, 37 | "no-control-regex": ERROR, 38 | "no-dupe-args": ERROR, 39 | "no-dupe-keys": ERROR, 40 | "no-duplicate-case": ERROR, 41 | "no-empty-character-class": ERROR, 42 | "no-ex-assign": ERROR, 43 | "no-extra-boolean-cast": ERROR, 44 | "no-extra-semi": ERROR, 45 | "no-func-assign": ERROR, 46 | "no-inner-declarations": ERROR, 47 | "no-invalid-regexp": ERROR, 48 | "no-irregular-whitespace": ERROR, 49 | "no-obj-calls": ERROR, 50 | "no-sparse-arrays": ERROR, 51 | "no-template-curly-in-string": ERROR, 52 | "no-unexpected-multiline": ERROR, 53 | "no-unsafe-finally": ERROR, 54 | "no-unsafe-negation": ERROR, 55 | "use-isnan": ERROR, 56 | "valid-typeof": ERROR, 57 | 58 | // "Best Practices" 59 | "eqeqeq": ERROR, 60 | "no-caller": ERROR, 61 | "no-case-declarations": ERROR, 62 | "no-empty-pattern": ERROR, 63 | "no-eq-null": ERROR, 64 | "no-eval": ERROR, 65 | "no-extend-native": ERROR, 66 | "no-fallthrough": ERROR, 67 | "no-global-assign": ERROR, 68 | "no-implicit-globals": ERROR, 69 | "no-implied-eval": ERROR, 70 | "no-iterator": ERROR, 71 | "no-loop-func": ERROR, 72 | "no-octal": ERROR, 73 | "no-octal-escape": ERROR, 74 | "no-proto": ERROR, 75 | "no-redeclare": ERROR, 76 | "no-restricted-properties": ERROR, 77 | "no-return-assign": ERROR, 78 | "no-return-await": ERROR, 79 | "no-script-url": ERROR, 80 | "no-self-assign": ERROR, 81 | "no-self-compare": ERROR, 82 | "no-throw-literal": ERROR, 83 | "no-useless-escape": ERROR, 84 | "no-with": ERROR, 85 | "prefer-promise-reject-errors": ERROR, 86 | "radix": ERROR, 87 | "require-await": ERROR, 88 | 89 | // "Strict Mode" 90 | "strict": [ ERROR, "global" ], 91 | 92 | // "Variables" 93 | "no-delete-var": ERROR, 94 | "no-undef": ERROR, 95 | "no-undef-init": ERROR, 96 | "no-use-before-define": [ ERROR, { "functions": false, "classes": true, "variables": false} ], 97 | 98 | // "Stylistic Issues" 99 | "new-cap": ERROR, 100 | "no-bitwise": ERROR, 101 | "no-mixed-spaces-and-tabs": ERROR, 102 | "semi": [ ERROR, "always" ], 103 | 104 | // "ECMAScript 6" 105 | "constructor-super": ERROR, 106 | "no-class-assign": ERROR, 107 | "no-confusing-arrow": ERROR, 108 | "no-const-assign": ERROR, 109 | "no-dupe-class-members": ERROR, 110 | "no-duplicate-imports": ERROR, 111 | "no-new-symbol": ERROR, 112 | "no-this-before-super": ERROR, 113 | "require-yield": ERROR 114 | } 115 | }; 116 | -------------------------------------------------------------------------------- /build/config/karma.conf.js: -------------------------------------------------------------------------------- 1 | // Karma configuration 2 | // Generated on Mon Sep 29 2014 15:15:28 GMT-0700 (PDT) 3 | "use strict"; 4 | 5 | module.exports = function(config) { 6 | config.set({ 7 | 8 | // base path that will be used to resolve all patterns (eg. files, exclude) 9 | basePath: '../../', 10 | 11 | 12 | // frameworks to use 13 | // available frameworks: https://npmjs.org/browse/keyword/karma-adapter 14 | frameworks: ['mocha', 'commonjs'], 15 | 16 | 17 | // list of files / patterns to load in the browser 18 | files: [ 19 | 'src/**/*.js', 20 | 'src/**/*.html', 21 | 'src/**/*.css', 22 | 'vendor/**/*.js', 23 | 'test/**/*.js' 24 | ], 25 | 26 | 27 | // list of files to exclude 28 | exclude: [], 29 | 30 | 31 | // preprocess matching files before serving them to the browser 32 | // available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor 33 | preprocessors: { 34 | // this glob avoids processing the *_script_test.js files, which will be loaded as 10 | 11 |
12 | 13 | 14 |Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem.
17 |