Skip to content

Commit

Permalink
Fix tests after merge with open source Cesium.
Browse files Browse the repository at this point in the history
  • Loading branch information
bagnell committed Apr 14, 2014
1 parent b297c31 commit 4fbc099
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions Specs/Scene/RectangularPyramidSensorVolumeSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -169,14 +169,14 @@ defineSuite([
camera.position = new Cartesian3(x, y, z);

scene.render();
expect(scene.context.readPixels()).toEqual([0, 0, 0, 255]);
expect(scene._context.readPixels()).toEqual([0, 0, 0, 255]);
var sensor = addSensor({
latitude : -90.0,
altitude : 2500000.0
});
sensor.portionToDisplay = SensorVolumePortionToDisplay.COMPLETE;
scene.render();
expect(scene.context.readPixels()).not.toEqual([0, 0, 0, 255]);
expect(scene._context.readPixels()).not.toEqual([0, 0, 0, 255]);
});

it('renders using below ellipsoid horizon option', function() {
Expand All @@ -189,14 +189,14 @@ defineSuite([
camera.position = new Cartesian3(x, y, z);

scene.render();
expect(scene.context.readPixels()).toEqual([0, 0, 0, 255]);
expect(scene._context.readPixels()).toEqual([0, 0, 0, 255]);
var sensor = addSensor({
latitude : -90.0,
altitude : 2500000.0
});
sensor.portionToDisplay = SensorVolumePortionToDisplay.BELOW_ELLIPSOID_HORIZON;
scene.render();
expect(scene.context.readPixels()).not.toEqual([0, 0, 0, 255]);
expect(scene._context.readPixels()).not.toEqual([0, 0, 0, 255]);
});

it('renders using above ellipsoid horizon option', function() {
Expand All @@ -209,25 +209,25 @@ defineSuite([
camera.position = new Cartesian3(x, y, z);

scene.render();
expect(scene.context.readPixels()).toEqual([0, 0, 0, 255]);
expect(scene._context.readPixels()).toEqual([0, 0, 0, 255]);
var sensor = addSensor({
latitude : -90.0,
altitude : 2500000.0
});
sensor.portionToDisplay = SensorVolumePortionToDisplay.ABOVE_ELLIPSOID_HORIZON;
scene.render();
expect(scene.context.readPixels()).not.toEqual([0, 0, 0, 255]);
expect(scene._context.readPixels()).not.toEqual([0, 0, 0, 255]);
});

it('renders', function() {
scene.render();
expect(scene.context.readPixels()).toEqual([0, 0, 0, 255]);
expect(scene._context.readPixels()).toEqual([0, 0, 0, 255]);
var sensor = addSensor({
latitude : -90.0,
altitude : 3000000.0
});
scene.render();
expect(scene.context.readPixels()).not.toEqual([0, 0, 0, 255]);
expect(scene._context.readPixels()).not.toEqual([0, 0, 0, 255]);
});

it('does not render when show is false', function() {
Expand All @@ -237,10 +237,10 @@ defineSuite([
});
sensor.show = true;
scene.render();
expect(scene.context.readPixels()).not.toEqual([0, 0, 0, 255]);
expect(scene._context.readPixels()).not.toEqual([0, 0, 0, 255]);
sensor.show = false;
scene.render();
expect(scene.context.readPixels()).toEqual([0, 0, 0, 255]);
expect(scene._context.readPixels()).toEqual([0, 0, 0, 255]);
});

it('is picked', function() {
Expand Down

0 comments on commit 4fbc099

Please sign in to comment.